Starting static website template to quickly create development environment of a simple test project.
- Synchronization between browsers.
- Livereload mode.
- Normalization of browser styles.
- Download required polyfills.
- jQuery.
- Test (Mocha and Chai).
- PWA (Progressive Wep Application).
- Convenient work with git-hooks (husky module).
- Check commit message (conventional commit specification).
- Automate the process of creating a change log.
- Linting of HTML code (on demand and in the "pre-commit" hook).
- Linting of CSS code (on demand and in the "pre-commit" hook).
- Linting of JS code (on demand and in the "pre-commit" hook).
- Formatting code (on demand and formatting check in the pre-commit hook).
- Add the necessary prefixes for CSS properties.
To work with a website template on your computer, Node.js 10.14.1+
and npm 6.4.1+
are required.
Download this zip archive or clone this repository (Git required) to your computer.
Then:
$ cd starter-website-lite
- go inside the project directory;$ npm install
- install dependencies;$ npm run start
- launch Gulp along with Browser-sync;- open the page in the browser at http://localhost:3000.
That's it, now the starting template is ready for work.
Command line:
$ npm run lint
- launch all linters;$ npm run lint:html
- launch HTML linter.$ npm run lint:css
- launch CSS linter.$ npm run lint:js
- launch JS linter;$ npm run eslint-check
- check the compatibility of ESLint rules with Priettier.
In addition, the code check is performed in the pre-commit hook.
Command line:
$ npm run format
- format all code in files according to a pattern (**/*.{html,css,js,json,yml,md}
);$ npm run format:html
- format all code in files according to a pattern (**/*.html
);$ npm run format:css
- format all code in files according to a pattern (**/*.css
);$ npm run format:js
- format all code in files according to a pattern (**/*.js
);$ npm run format:json
- format all code in files according to a pattern (**/*.json
);$ npm run format:md
- format all code in files according to a pattern (**/*.md
);$ npm run format:file <glob pattern|path to file>
- format the code in the specified file or files
(example:$ npm run format:file "public/index.html"
);$ npm run format-check
- check if the files (glob pattern:**/*.{html,css,js,json,yml,md}
) are formatted;$ npm run format-check-file <glob pattern|path to file>
- check if the file is formatted
(example:$ npm run format-check-file "public/index.html"
);
In addition, the code formatting check is performed in the pre-commit hook.
List of supported browsers (see package.json):
- "last 2 version";
- "> 1%".
Command line:
$ npm run autoprefix
- add the necessary prefixes for CSS properties.
Checking a commit message is done using the commitlint module. Rules for validation correspond to conventional commit specification.
Commitlint.io (online generator) is used to create and pre-check the text of the commit message.
Workflow:
- make changes;
- commit those changes;
- pull all the tags (optional);
$ npm version [patch|minor|major]
- run the command;- push commits and tags to remote repository.
If you find a bug or something does not work, please leave your questions or comments on issues.