Skip to content

Commit d0b9007

Browse files
committed
some small updates to the docs
1 parent 13c8858 commit d0b9007

File tree

5 files changed

+55
-17
lines changed

5 files changed

+55
-17
lines changed

docs/backend.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,31 @@ Let's take a look at the default `config/index.js`:
1010
const path = require('path')
1111

1212
module.exports = {
13+
dev: {
14+
/ Paths
15+
assetsSubDirectory: 'static',
16+
assetsPublicPath: '/',
17+
proxyTable: {},
18+
19+
// Various Dev Server settings
20+
host: 'localhost',
21+
port: 8080,
22+
23+
// skipping other options as they are only convenience features
24+
},
1325
build: {
14-
index: path.resolve(__dirname, 'dist/index.html'),
15-
assetsRoot: path.resolve(__dirname, 'dist'),
26+
// Template for index.html
27+
index: path.resolve(__dirname, '../dist/index.html'),
28+
29+
// Paths
30+
assetsRoot: path.resolve(__dirname, '../dist'),
1631
assetsSubDirectory: 'static',
1732
assetsPublicPath: '/',
18-
productionSourceMap: true
33+
34+
productionSourceMap: true,
35+
36+
// skipping the rest ...
1937
},
20-
dev: {
21-
port: 8080,
22-
proxyTable: {}
23-
}
2438
}
2539
```
2640

docs/commands.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ All build commands are executed via [NPM Scripts](https://docs.npmjs.com/misc/sc
3636
- Works with one command out of the box:
3737
- Selenium and chromedriver dependencies automatically handled.
3838
- Automatically spawns the Selenium server.
39+
40+
### `npm run lint`
41+
42+
> Runs eslint and reports any linting errors in your code. See [Linter Configuration](linter.md)

docs/linter.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,14 @@ If you are not happy with the default linting rules, you have several options:
1414
2. Pick a different ESLint preset when generating the project, for example [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb).
1515

1616
3. Pick "none" for ESLint preset when generating the project and define your own rules. See [ESLint documentation](https://eslint.org/docs/rules/) for more details.
17+
18+
## Fixing Linting Errors
19+
20+
You can run the following command to let eslint fix any errors it finds (if it can - not all errors are fixable like this):
21+
22+
```
23+
npm run lint -- --fix
24+
```
25+
26+
*(The `--` in the middle is necessary to ensure the `--fix` option is passdd to `eslint`, not to `npm`)*
27+

docs/pre-processors.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@ Once installed, you can use the pre-processors inside your `*.vue` components us
2525

2626
### PostCSS
2727

28-
Styles in `*.vue` files are piped through PostCSS by default, so you don't need to use a specific loader for it. You can simply add PostCSS plugins you want to use in `build/webpack.base.conf.js` under the `vue` block:
28+
Styles in `*.vue` files and style files (`*.css`, `*.scss` etc) are piped through PostCSS by default, so you don't need to use a specific loader for it.
29+
30+
You can simply add PostCSS plugins you want to use to the `.postcssrc.js`file in your project's root directory:
2931

3032
``` js
31-
// build/webpack.base.conf.js
33+
// https://github.com/michael-ciniawsky/postcss-load-config
34+
3235
module.exports = {
33-
// ...
34-
vue: {
35-
postcss: [/* your plugins */]
36+
"plugins": {
37+
// to edit target browsers: use "browserslist" field in package.json
38+
"postcss-import": {},
39+
"autoprefixer": {}
3640
}
3741
}
3842
```

docs/structure.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,25 @@
1818
├── test/
1919
│ └── unit/ # unit tests
2020
│ │ ├── specs/ # test spec files
21-
│ │ ├── setup.js # file that runs before Jest tests
21+
│ │ ├── eslintrc # config file for eslint with extra settings only for unit tests
2222
│ │ ├── index.js # test build entry file
23-
│ │ └── karma.conf.js # test runner config file
23+
│ │ ├── jest.conf.js # Config file when using Jest for unit tests
24+
│ │ └── karma.conf.js # test runner config file when using Karma for unit tests
25+
│ │ ├── setup.js # file that runs before Jest runs your unit tests
2426
│ └── e2e/ # e2e tests
2527
│ │   ├── specs/ # test spec files
2628
│ │   ├── custom-assertions/ # custom assertions for e2e tests
2729
│ │   ├── runner.js # test runner script
2830
│ │   └── nightwatch.conf.js # test runner config file
2931
├── .babelrc # babel config
30-
├── .postcssrc.js # postcss config
32+
├── .editorconfig # indentation, spaces/tabs and similar settings for your editor
3133
├── .eslintrc.js # eslint config
32-
├── .editorconfig # editor config
34+
├── .eslintignore.js # eslint ignore rules
35+
├── .gitignore # sensible defaults for gitignore
36+
├── .postcssrc.js # postcss config
3337
├── index.html # index.html template
34-
└── package.json # build scripts and dependencies
38+
├── package.json # build scripts and dependencies
39+
└── README.md # Default README file
3540
```
3641

3742
### `build/`

0 commit comments

Comments
 (0)