- login to admin, open /admin/micro_sites
- add new microsite
- click
develop
button - start developing
You’ll need to have Node >= 4 on your machine. We strongly recommend to use Node >= 6 and npm >= 3 for faster installation speed and better disk usage
- Download Microsite develop environment ZIP file.
- Unzip file, go to
microsite-develop
directory. - Create a folder(e.g. named
src
) or move your microsite project folder intomicrosite-develop
directory(:bulb: Tip: All below setups assume your microsite assets folder name issrc
, you should change it if you rename the assets folder). - Install required Node.js modules
$ npm install
-
Open
microsite.config.js
file to modify microsite configS3
: AWS S3 config.WatchPath
: your microsite assets path(/Users/yourname/microsite-develop/src
).Webpack
: If you don't need webpack tool to bundle your assets. just ignore this config.PreviewUrl
: check admin microsite preview url, replace with your microsite preview url.
- Go to the project directory
$ cd microsite-develop
- Run script
$ npm run watch
sever will watch directory which defined in microsite.config.js
file WatchPath
property. if file changed or added, will upload to S3 immediately.
- Start developing
-
Open
microsite.config.js
file to modifyWebpack
configappHtml
your main HTML path, default issrc/index.html
appIndexJs
your main JS path, default issrc/index.js
, please import other JS and CSS into this file.appBuild
folder name. after you runnpm run release
, all bundled assets will store in this folder. default isbuild
.appSrc
same asWatchPath
, but just need folder name. default issrc
.
-
Go to the project directory
$ cd microsite-develop
- Run script
$ npm run dev
- Start developing