|
1 | | -# Generator-frontend-webpack |
| 1 | +# Generator-front-webpack |
2 | 2 |
|
| 3 | +> Yeoman generator for frontend apps - lets you quickly set up a project |
| 4 | + including dev server, unit tests and [Webpack](http://webpack.github.io/) module system. |
3 | 5 |
|
4 | | -## How to use |
| 6 | +## Features |
5 | 7 |
|
6 | | -1. Install generator globally `$ npm install -g generator-front-webpack` |
7 | | -2. initiate the generator: `$ yo front-webpack`' |
8 | | -3. Run dev server: `$ npm start` |
9 | | -4. Open `http://localhost:8080/` to see compiled app. |
10 | | -5. If you want to build files without dev server run command `$ npm run build` |
11 | | -6. If you want test your app enter `$npm test` |
| 8 | +- Transpiling ES2015 to ES5 via Babel-Loader |
| 9 | +- Compiling SCSS/SASS to CSS |
| 10 | +- Autoprefixing styles via PostCSS |
| 11 | +- Automatic JavaScript code linting via esLint |
| 12 | +- Automatic Sass code linting via sasslint |
| 13 | +- HTML linting via html-validator |
| 14 | +- Web accessibility linting via AccessSniff |
| 15 | +- Ability to unit test JavaScript code via Karma and Jasmine |
12 | 16 |
|
13 | | -## How to contribute |
| 17 | +## Installation |
| 18 | +```bash |
| 19 | +# Make sure both is installed globally |
| 20 | +npm install -g yo |
| 21 | +npm install -g generator-front-webpack |
| 22 | +``` |
14 | 23 |
|
15 | | -If you want contribute this project please select a issue from TO DO |
16 | | -column on Trello Board, create fork of this repository. At the end please |
17 | | -create pull request with your changes. |
| 24 | +## Setting up projects |
| 25 | +```bash |
| 26 | +# Create a new directory, and `cd` into it: |
| 27 | +mkdir new-project && cd new-project |
| 28 | + |
| 29 | +mkdir new-project && cd new-project |
| 30 | +``` |
| 31 | + |
| 32 | +### Commands |
| 33 | + |
| 34 | +#### Dev server |
| 35 | + |
| 36 | +Run dev server: `$ npm start` |
| 37 | +Open `http://localhost:8080/` to see compiled app. |
| 38 | + |
| 39 | +#### Build app |
| 40 | + |
| 41 | +If you want to build files without dev server run command `$ npm run build` |
| 42 | + |
| 43 | +#### Test app |
| 44 | + |
| 45 | +If you want test your app enter `$npm test` |
| 46 | + |
| 47 | +This command including: |
| 48 | + |
| 49 | +- unit testing |
| 50 | +- js linting |
| 51 | +- sass linting |
| 52 | +- html validation |
| 53 | +- web accessibility linting |
| 54 | + |
| 55 | +If you want run only one kind of a test you can use one of these commands: |
| 56 | + |
| 57 | +##### Unit testing |
| 58 | + |
| 59 | +`$ karma start` |
| 60 | + |
| 61 | +##### JavaScript linting |
| 62 | + |
| 63 | +`$ npm start eslint` |
| 64 | + |
| 65 | +##### SASS linting |
| 66 | + |
| 67 | +`$ npm run sasslint` |
| 68 | + |
| 69 | +##### HTML validation |
| 70 | + |
| 71 | +`$ npm run htmllint` |
| 72 | + |
| 73 | +##### Web accessibility linting |
| 74 | + |
| 75 | +`$ npm start accessibility` |
0 commit comments