This skeleton app serve as base to develop ReactJS-Redux apps in Salesforce. The app has the minimal dependencies to work with ES6, Webpack, Redux, Sass and JSforce.
- Node
- NPM
Tool to create the zip
brew install p7zip
Install package's dependencies
npm install
####Run the app
npm start
Create Visualforce page pointing to: localHost:8080/bundle.js
Example
<apex:page applyBodyTag="false" docType="html-5.0">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body>
<div id="react-app">
</div>
</body>
<script type="text/javascript">
</script>
<script charset="utf-8" src="https://localhost:8080/bundle.js" type="text/javascript"></script>
</html>
</apex:page>
The following script generate and upload the zip to salesforce
npm deploySR
Replace the script tag on the page pointing to the static resource. Example:
<script charset="utf-8" src="{!URLFOR($Resource.mystaticresource,'bundle.js')}" type="text/javascript"></script>
Edit salesforce.config.js file:
username: '',
password: '',
zipName:'',
zipDescription: ''
- UnitTest