Skip to content

Commit 123737e

Browse files
committed
update: vuejs-templates/webpack to v1.3.1
1 parent 6de23dc commit 123737e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3089
-2039
lines changed

.babelrc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"presets": [
3-
["env", { "modules": false }],
3+
["env", {
4+
"modules": false,
5+
"targets": {
6+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7+
}
8+
}],
49
"stage-2"
510
],
6-
"plugins": ["transform-runtime"],
7-
"comments": false,
11+
"plugins": ["transform-vue-jsx", "transform-runtime"],
812
"env": {
913
"test": {
1014
"presets": ["env", "stage-2"],
11-
"plugins": [ "istanbul" ]
15+
"plugins": ["transform-vue-jsx", "istanbul"]
1216
}
1317
}
1418
}

.eslintignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
build/*.js
2-
config/*.js
1+
/build/
2+
/config/
3+
/dist/
4+
/*.js
5+
/test/unit/coverage/
6+
/test/e2e/specs/

.eslintrc.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@
22

33
module.exports = {
44
root: true,
5-
parser: 'babel-eslint',
65
parserOptions: {
7-
sourceType: 'module'
6+
parser: 'babel-eslint'
87
},
98
env: {
109
browser: true,
1110
},
12-
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13-
extends: 'standard',
11+
extends: [
12+
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
13+
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
14+
'plugin:vue/essential',
15+
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
16+
'standard'
17+
],
1418
// required to lint *.vue files
1519
plugins: [
16-
'html'
20+
'vue'
1721
],
1822
// add your custom rules here
19-
'rules': {
20-
// allow paren-less arrow functions
21-
'arrow-parens': 0,
23+
rules: {
2224
// allow async-await
23-
'generator-star-spacing': 0,
25+
'generator-star-spacing': 'off',
2426
// allow debugger during development
25-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
27+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
2628
}
2729
}

.gitignore

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
.idea
21
.DS_Store
32
node_modules/
4-
dist/
3+
/dist/
54
npm-debug.log*
65
yarn-debug.log*
76
yarn-error.log*
8-
test/unit/coverage
9-
test/e2e/reports
7+
/test/unit/coverage/
8+
/test/e2e/reports/
109
selenium-debug.log
10+
11+
# Editor directories and files
12+
.idea
13+
.vscode
14+
*.suo
15+
*.ntvs*
16+
*.njsproj
17+
*.sln

.postcssrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
module.exports = {
44
"plugins": {
5-
// to edit target browsers: use "browserlist" field in package.json
5+
"postcss-import": {},
6+
"postcss-url": {},
7+
// to edit target browsers: use "browserslist" field in package.json
68
"autoprefixer": {}
79
}
810
}

README.md

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,74 @@ Within the download you'll find the following directories and files:
3232

3333
```
3434
CoreUI-Vue/
35-
├── Vue_Full_Project/
36-
├── Vue_Starter/
37-
35+
├── build/ # webpack config files
36+
├── config/ # main project config
37+
├── scss/ # styles
38+
├── src/ # project root
39+
│ ├── assets/ # module assets (processed by webpack)
40+
│ ├── components/ # ui components
41+
│ ├── containers/ # ui containers
42+
│ ├── router/ # routing
43+
│ ├── shared/ # utils
44+
│ ├── views/ # ui views
45+
│ ├── App.vue # main app component
46+
│ └── main.js # app entry file
47+
├── _nav.js # sidebar nav config
48+
├── static/ # pure static assets (directly copied)
49+
├── test/
50+
│ └── unit/ # unit tests
51+
│ └── e2e/ # e2e tests
52+
├── .babelrc.js # babel config
53+
├── .editorconfig # settings for your editor
54+
├── .eslintignore # eslint ignore rules
55+
├── .eslintrc.js # eslint config
56+
├── .gitignore # defaults for gitignore
57+
├── .postcssrc.js # postcss config
58+
├── CHANGELOG.md
59+
├── index.html # index.html template
60+
├── LICENSE
61+
├── README.md
62+
└── package.json # build scripts and dependencies
3863
```
3964

4065
## Other Versions
4166

4267
CoreUI includes 6 Version for Angular 4, AngularJS, React.js, Vue.js, Static HTML5 and AJAX HTML5.
4368

44-
* [Angular Version (Angular 2+)](https://github.com/mrholek/CoreUI-Angular).
45-
* [AngularJS Version](https://github.com/mrholek/CoreUI-AngularJS).
46-
* [HTML5 AJAX Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template).
47-
* [HTML5 Static Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template).
48-
* [React.js Version](https://github.com/mrholek/CoreUI-React).
49-
* [Vue.js Version](https://github.com/mrholek/CoreUI-Vue).
69+
* [Angular Version (Angular 2+)](https://github.com/mrholek/CoreUI-Angular)
70+
* [AngularJS Version](https://github.com/mrholek/CoreUI-AngularJS)
71+
* [HTML5 AJAX Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template)
72+
* [HTML5 Static Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template)
73+
* [React.js Version](https://github.com/mrholek/CoreUI-React)
74+
* [Vue.js Version](https://github.com/mrholek/CoreUI-Vue)
75+
* [ASP.NET Core 2 MVC Version](https://github.com/mrholek/CoreUI-NET)
76+
77+
## Build Setup
78+
79+
``` bash
80+
# install dependencies
81+
npm install
82+
83+
# serve with hot reload at localhost:8080
84+
npm run dev
85+
86+
# build for production with minification
87+
npm run build
88+
89+
# build for production and view the bundle analyzer report
90+
npm run build --report
91+
92+
# run unit tests
93+
npm run unit
94+
95+
# run e2e tests
96+
npm run e2e
97+
98+
# run all tests
99+
npm test
100+
```
101+
102+
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
50103

51104
## Bugs and feature requests
52105

build/build.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1+
'use strict'
12
require('./check-versions')()
23

34
process.env.NODE_ENV = 'production'
45

5-
var ora = require('ora')
6-
var rm = require('rimraf')
7-
var path = require('path')
8-
var chalk = require('chalk')
9-
var webpack = require('webpack')
10-
var config = require('../config')
11-
var webpackConfig = require('./webpack.prod.conf')
6+
const ora = require('ora')
7+
const rm = require('rimraf')
8+
const path = require('path')
9+
const chalk = require('chalk')
10+
const webpack = require('webpack')
11+
const config = require('../config')
12+
const webpackConfig = require('./webpack.prod.conf')
1213

13-
var spinner = ora('building for production...')
14+
const spinner = ora('building for production...')
1415
spinner.start()
1516

1617
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
1718
if (err) throw err
18-
webpack(webpackConfig, function (err, stats) {
19+
webpack(webpackConfig, (err, stats) => {
1920
spinner.stop()
2021
if (err) throw err
2122
process.stdout.write(stats.toString({
2223
colors: true,
2324
modules: false,
24-
children: false,
25+
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
2526
chunks: false,
2627
chunkModules: false
2728
}) + '\n\n')
2829

30+
if (stats.hasErrors()) {
31+
console.log(chalk.red(' Build failed with errors.\n'))
32+
process.exit(1)
33+
}
34+
2935
console.log(chalk.cyan(' Build complete.\n'))
3036
console.log(chalk.yellow(
3137
' Tip: built files are meant to be served over an HTTP server.\n' +

build/check-versions.js

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
var chalk = require('chalk')
2-
var semver = require('semver')
3-
var packageConfig = require('../package.json')
4-
var shell = require('shelljs')
1+
'use strict'
2+
const chalk = require('chalk')
3+
const semver = require('semver')
4+
const packageConfig = require('../package.json')
5+
const shell = require('shelljs')
6+
57
function exec (cmd) {
68
return require('child_process').execSync(cmd).toString().trim()
79
}
810

9-
var versionRequirements = [
11+
const versionRequirements = [
1012
{
1113
name: 'node',
1214
currentVersion: semver.clean(process.version),
1315
versionRequirement: packageConfig.engines.node
14-
},
16+
}
1517
]
1618

1719
if (shell.which('npm')) {
@@ -23,9 +25,11 @@ if (shell.which('npm')) {
2325
}
2426

2527
module.exports = function () {
26-
var warnings = []
27-
for (var i = 0; i < versionRequirements.length; i++) {
28-
var mod = versionRequirements[i]
28+
const warnings = []
29+
30+
for (let i = 0; i < versionRequirements.length; i++) {
31+
const mod = versionRequirements[i]
32+
2933
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
3034
warnings.push(mod.name + ': ' +
3135
chalk.red(mod.currentVersion) + ' should be ' +
@@ -38,10 +42,12 @@ module.exports = function () {
3842
console.log('')
3943
console.log(chalk.yellow('To use this template, you must update following to modules:'))
4044
console.log()
41-
for (var i = 0; i < warnings.length; i++) {
42-
var warning = warnings[i]
45+
46+
for (let i = 0; i < warnings.length; i++) {
47+
const warning = warnings[i]
4348
console.log(' ' + warning)
4449
}
50+
4551
console.log()
4652
process.exit(1)
4753
}

build/dev-client.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

build/dev-server.js

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)