(For Japanese, please see README.jp.md)
A template for developing Lightning Component with React.
This template automates the following things:
- Build JavaScript & CSS using webpack
- Compress all bundled files and create StaticResource (
.resource
) - Deploy StaticResource and all other metadata to your Salesforce org
- Watch file changes and run re-build & deploy
First you need to rename .env.sample
to .env
and input your Salesforce org credentials.
Then run following command.
$ npm install
$ npm install -g gulp
# Build JS/CSS & Create StaticResource & Deploy
$ gulp
The default Lightning Component name is HereIsYourComponentName
.
You can rename it as you like.
Please rename the following:
componentName
variable ingulpfile.js
- All directories and files under
pkg/aura
andpkg/staticresources
- Inside
pkg/aura/PreviewApp/PreviewApp.app
- Inside
pkg/aura/HereIsYourComponentName/HereIsYourComponentName.cmp
(Atltng:require
)
The default library name is yourLibraryName
.
This name is used in client controller script of component.
Please rename the following:
libraryName
variable inwebpack.config.js
- Inside
pkg/aura/HereIsYourComponentName/HereIsYourComponentNameController.js
(Where callinginit
method)
MIT