This is frontend starter template for the html team
- Nodejs (https://nodejs.org/en/download/)
- On Windows - Install C++ Build Tools for Windows (run command with administrator)
npm install --global --production windows-build-tools- Node.js native addon build tool (https://github.com/nodejs/node-gyp)
- Install the
Gulp CLIcommand (optional):
npm install --global gulp-cli
git clone https://github.com/khacthienonline/template-frontend.git <projectname>
cd <projectname>
npm install
git remote set-url origin https://bitbucket.org/<NEW_GIT_REPO>.git
git checkout -b htmlThe husky module will install git hook for you and when you run git command, the husky will run the npm script for you
npm install husky --save-dev
npm start
npm run install-module -- -p <componentname> # for example: componentname is fc8-footer
# creating `src/html/{home.html, about-us.html, contact.html}`
npm run create-page -- -p 'home about-us contact'
# creating `src/html/modules/banner.html` `src/stylesheets/module/_banner.scss`
# and `src/html/modules/user.html` `src/stylesheets/module/_user.scss`
npm run create-module -- -m 'banner user' # seperating by comma
# creating `src/javascripts/modules/Banner.js` `src/javascripts/modules/User.js`
npm run create-js -- -m 'banner user' # seperating by comma
npm run standard
npm run stylelint
npm run build
# starting demo server
npm run demo
git add .
git commit -m "message" # NOTE `PRECOMMIT HOOK` WILL RUN TO CHECK `JS LINT` AND `STYLELINT`
git push origin html