You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* develop:
bump version 1.2.5
some small updates to the docs
Adds support for the video poster attribute (#1123)
babel-register use only for e2e tests (#1120)
Update project creation: sort dependencies in package.json (#1118)
Fix bug from PR #1082
FIX: convert env variable PORT to a number.
Minor refactoring of build scripts (#1082)
ESLint config clean up (#1093)
Switch to uglifyjs-webpack-plugin (#1119)
change bad spaces into normal spaces and removing trailing space (#1132)
prevent empty line when unit = y & e2e = n
Update meta.js (#1091)
docs(README): Update usage to init from develop branch (#1092)
Use actual host for notification (#1101). (#1103)
prevent webpack from injecting useless mocks
Copy file name to clipboardExpand all lines: README.md
+9-1
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,14 @@ $ npm install
21
21
$ npm run dev
22
22
```
23
23
24
+
This will scaffold the project using the `master` branch. If you wish to use the latest version of the webpack template, do the following instead:
25
+
26
+
```bash
27
+
$ vue init webpack#develop my-project
28
+
```
29
+
30
+
:warning:**The develop branch is not considered stable and can contain bugs or not build at all, so use at your own risk.**
31
+
24
32
The development server will run on port 8080 by default. If that port is already in use on your machine, the next free port will be used.
25
33
26
34
## What's Included
@@ -33,7 +41,7 @@ The development server will run on port 8080 by default. If that port is already
33
41
- Source maps
34
42
35
43
-`npm run build`: Production ready build.
36
-
- JavaScript minified with [UglifyJS](https://github.com/mishoo/UglifyJS2).
44
+
- JavaScript minified with [UglifyJS v3](https://github.com/mishoo/UglifyJS2/tree/harmony).
37
45
- HTML minified with [html-minifier](https://github.com/kangax/html-minifier).
38
46
- CSS across all components extracted into a single file and minified with [cssnano](https://github.com/ben-eb/cssnano).
39
47
- Static assets compiled with version hashes for efficient long-term caching, and an auto-generated production `index.html` with proper URLs to these generated assets.
Copy file name to clipboardExpand all lines: docs/commands.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ All build commands are executed via [NPM Scripts](https://docs.npmjs.com/misc/sc
16
16
17
17
> Build assets for production. See [Integrating with Backend Framework](backend.md) for more details.
18
18
19
-
- JavaScript minified with [UglifyJS](https://github.com/mishoo/UglifyJS2).
19
+
- JavaScript minified with [UglifyJS v3](https://github.com/mishoo/UglifyJS2/tree/harmony).
20
20
- HTML minified with [html-minifier](https://github.com/kangax/html-minifier).
21
21
- CSS across all components extracted into a single file and minified with [cssnano](https://github.com/ben-eb/cssnano).
22
22
- All static assets compiled with version hashes for efficient long-term caching, and a production `index.html` is auto-generated with proper URLs to these generated assets.
@@ -36,3 +36,7 @@ All build commands are executed via [NPM Scripts](https://docs.npmjs.com/misc/sc
36
36
- Works with one command out of the box:
37
37
- Selenium and chromedriver dependencies automatically handled.
38
38
- 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)
Copy file name to clipboardExpand all lines: docs/linter.md
+11
Original file line number
Diff line number
Diff line change
@@ -14,3 +14,14 @@ If you are not happy with the default linting rules, you have several options:
14
14
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).
15
15
16
16
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`)*
Copy file name to clipboardExpand all lines: docs/pre-processors.md
+9-5
Original file line number
Diff line number
Diff line change
@@ -25,14 +25,18 @@ Once installed, you can use the pre-processors inside your `*.vue` components us
25
25
26
26
### PostCSS
27
27
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:
Copy file name to clipboardExpand all lines: meta.js
+29-2
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,15 @@
1
+
constpath=require('path');
2
+
constfs=require('fs');
3
+
4
+
functionsortObject(object){
5
+
// Based on https://github.com/yarnpkg/yarn/blob/v1.3.2/src/config.js#L79-L85
6
+
constsortedObject={};
7
+
Object.keys(object).sort().forEach(item=>{
8
+
sortedObject[item]=object[item];
9
+
});
10
+
returnsortedObject;
11
+
}
12
+
1
13
module.exports={
2
14
"helpers": {
3
15
"if_or": function(v1,v2,options){
@@ -72,7 +84,7 @@ module.exports = {
72
84
},
73
85
"unit": {
74
86
"type": "confirm",
75
-
"message": "Setup unit tests"
87
+
"message": "Set up unit tests"
76
88
},
77
89
"runner": {
78
90
"when": "unit",
@@ -115,5 +127,20 @@ module.exports = {
115
127
"test/e2e/**/*": "e2e",
116
128
"src/router/**/*": "router"
117
129
},
118
-
"completeMessage": "To get started:\n\n {{^inPlace}}cd {{destDirName}}\n {{/inPlace}}npm install\n npm run dev\n\nDocumentation can be found at https://vuejs-templates.github.io/webpack"
constmessage=`To get started:\n\n ${data.inPlace ? '' : `cd ${data.destDirName}\n `}npm install\n npm run dev\n\nDocumentation can be found at https://vuejs-templates.github.io/webpack`;
0 commit comments