- login to admin, open /admin/micro_sites
- add new microsite
- click
developbutton - 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-developdirectory. - Create a folder(e.g. named
src) or move your microsite project folder intomicrosite-developdirectory(: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.jsfile 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.jsfile to modifyWebpackconfigappHtmlyour main HTML path, default issrc/index.htmlappIndexJsyour main JS path, default issrc/index.js, please import other JS and CSS into this file.appBuildfolder name. after you runnpm run release, all bundled assets will store in this folder. default isbuild.appSrcsame asWatchPath, but just need folder name. default issrc.
-
Go to the project directory
$ cd microsite-develop
- Run script
$ npm run dev
- Start developing