From b19571616d4fcbf8099b6383fb6d4a6b89dd6cea Mon Sep 17 00:00:00 2001 From: Christian Raidl Date: Wed, 20 Jul 2016 20:39:29 +0200 Subject: [PATCH 001/339] fix path to config file (#202) --- docs/proxy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/proxy.md b/docs/proxy.md index e8b39b982a..bc61676409 100644 --- a/docs/proxy.md +++ b/docs/proxy.md @@ -2,10 +2,10 @@ When integrating this boilerplate with an existing backend, a common need is to access the backend API when using the dev server. To achieve that, we can run the dev server and the API backend side-by-side (or remotely), and let the dev server proxy all API requests to the actual backend. -To configure the proxy rules, edit `dev.proxyTable` option in `config.js`. The dev server is using [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) for proxying, so you should refer to its docs for detailed usage. But here's a simple example: +To configure the proxy rules, edit `dev.proxyTable` option in `config/index.js`. The dev server is using [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) for proxying, so you should refer to its docs for detailed usage. But here's a simple example: ``` js -// config.js +// config/index.js module.exports = { // ... dev: { From a20fbea351ed04a1a64e3b12975e11a7db06a6fb Mon Sep 17 00:00:00 2001 From: Ian Walter Date: Tue, 26 Jul 2016 12:33:03 -0400 Subject: [PATCH 002/339] Adding Babel register to Nightwatch conf (#197) * Adding babel register to nightwatch conf * Using babel-register package * Alphabetizing babel-register dependency --- template/package.json | 1 + template/test/e2e/nightwatch.conf.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/template/package.json b/template/package.json index aa54b6842c..68b508b7dd 100644 --- a/template/package.json +++ b/template/package.json @@ -29,6 +29,7 @@ "babel-plugin-transform-runtime": "^6.0.0", "babel-preset-es2015": "^6.0.0", "babel-preset-stage-2": "^6.0.0", + "babel-register": "^6.0.0", "connect-history-api-fallback": "^1.1.0", "css-loader": "^0.23.0", {{#lint}} diff --git a/template/test/e2e/nightwatch.conf.js b/template/test/e2e/nightwatch.conf.js index b5d911ce57..424f7f516c 100644 --- a/template/test/e2e/nightwatch.conf.js +++ b/template/test/e2e/nightwatch.conf.js @@ -1,3 +1,5 @@ +require('babel-register') + // http://nightwatchjs.org/guide#settings-file module.exports = { "src_folders": ["test/e2e/specs"], From 548807d1d508b9a86f311cc491992170b1eb2aa3 Mon Sep 17 00:00:00 2001 From: PPxu Date: Fri, 12 Aug 2016 11:50:16 +0800 Subject: [PATCH 003/339] Remove unnecessary comma (#218) --- template/config/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/config/index.js b/template/config/index.js index 18debfe046..207dfbd4e0 100644 --- a/template/config/index.js +++ b/template/config/index.js @@ -27,6 +27,6 @@ module.exports = { // (https://github.com/webpack/css-loader#sourcemaps) // In our experience, they generally work as expected, // just be aware of this issue when enabling this option. - cssSourceMap: false, + cssSourceMap: false } } From 4982f1f348fd264650fc13993ee243e02e6c7bc0 Mon Sep 17 00:00:00 2001 From: ahui <540886643@qq.com> Date: Fri, 12 Aug 2016 13:01:45 +0800 Subject: [PATCH 004/339] assets utils (#206) --- template/build/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template/build/utils.js b/template/build/utils.js index d294e35892..d15685f73a 100644 --- a/template/build/utils.js +++ b/template/build/utils.js @@ -3,7 +3,9 @@ var config = require('../config') var ExtractTextPlugin = require('extract-text-webpack-plugin') exports.assetsPath = function (_path) { - return path.posix.join(config.build.assetsSubDirectory, _path) + var assetsSubDirectory = process.env.NODE_ENV === 'production' ? + config.build.assetsPublicPath : config.dev.assetsPublicPath + return path.posix.join(assetsSubDirectory, _path) } exports.cssLoaders = function (options) { From 3ecc67da6cf992f62e79862862588fad51f42ebf Mon Sep 17 00:00:00 2001 From: Chris Fritz Date: Fri, 12 Aug 2016 08:47:37 +0200 Subject: [PATCH 005/339] fix typo in assetspath --- template/build/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/template/build/utils.js b/template/build/utils.js index d15685f73a..4ec8d0bb37 100644 --- a/template/build/utils.js +++ b/template/build/utils.js @@ -3,8 +3,9 @@ var config = require('../config') var ExtractTextPlugin = require('extract-text-webpack-plugin') exports.assetsPath = function (_path) { - var assetsSubDirectory = process.env.NODE_ENV === 'production' ? - config.build.assetsPublicPath : config.dev.assetsPublicPath + var assetsSubDirectory = process.env.NODE_ENV === 'production' + ? config.build.assetsSubDirectory + : config.dev.assetsSubDirectory return path.posix.join(assetsSubDirectory, _path) } From fccf3408273f48a52f1ff991368232e66ffc230f Mon Sep 17 00:00:00 2001 From: zigomir Date: Thu, 18 Aug 2016 19:39:25 -0700 Subject: [PATCH 006/339] 1.0 compatibility branch. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9f61eaffd..1cbcea3c70 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is a project template for [vue-cli](https://github.com/vuejs/vue-cli). **It ``` bash $ npm install -g vue-cli -$ vue init webpack my-project +$ vue init webpack#1.0 my-project $ cd my-project $ npm install $ npm run dev From c43bb4f17929047bb3db2aca35b5f894006b6de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20L=C3=BCnborg?= Date: Thu, 8 Sep 2016 17:04:41 +0200 Subject: [PATCH 007/339] Fix #238 hello.spec.js lint for 1.0 (#252) * initial commit * forgot two lines --- template/test/unit/specs/Hello.spec.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/template/test/unit/specs/Hello.spec.js b/template/test/unit/specs/Hello.spec.js index 835ad99fc9..72808462da 100644 --- a/template/test/unit/specs/Hello.spec.js +++ b/template/test/unit/specs/Hello.spec.js @@ -1,12 +1,12 @@ -import Vue from 'vue' -import Hello from 'src/components/Hello' +import Vue from 'vue'{{#if_eq lintConfig "airbnb"}};{{/if_eq}} +import Hello from 'src/components/Hello'{{#if_eq lintConfig "airbnb"}};{{/if_eq}} describe('Hello.vue', () => { it('should render correct contents', () => { const vm = new Vue({ template: '
', - components: { Hello } - }).$mount() - expect(vm.$el.querySelector('.hello h1').textContent).to.contain('Hello World!') - }) -}) + components: { Hello }{{#if_eq lintConfig "airbnb"}},{{/if_eq}} + }).$mount(){{#if_eq lintConfig "airbnb"}};{{/if_eq}} + expect(vm.$el.querySelector('.hello h1').textContent).to.contain('Hello World!'){{#if_eq lintConfig "airbnb"}};{{/if_eq}} + }){{#if_eq lintConfig "airbnb"}};{{/if_eq}} +}){{#if_eq lintConfig "airbnb"}};{{/if_eq}} From bb14dc6912f09d9888604a534dbe2a55235ed194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20L=C3=BCnborg?= Date: Thu, 8 Sep 2016 17:06:58 +0200 Subject: [PATCH 008/339] Fix #237 npm eslint without e2e tests 1.0 (#249) * fix #238 * Revert "fix #238" This reverts commit ffa7024cf0832012f99e4b74477a853a9e334ecf. * fix #237 for 1.0 * fix wrong placement of quotation mark --- template/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/package.json b/template/package.json index 68b508b7dd..c940a343e7 100644 --- a/template/package.json +++ b/template/package.json @@ -14,7 +14,7 @@ "e2e": "node test/e2e/runner.js", {{/e2e}} "test": "{{#unit}}npm run unit{{/unit}}{{#unit}}{{#e2e}} && {{/e2e}}{{/unit}}{{#e2e}}npm run e2e{{/e2e}}"{{#lint}}, - "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs"{{/lint}} + "lint": "eslint --ext .js,.vue src{{#unit}} test/unit/specs{{/unit}}{{#e2e}} test/e2e/specs{{/e2e}}"{{/lint}} }, "dependencies": { "vue": "^1.0.21", From 49b3ac5de552ab82ac6b44f3bb197bfc54063688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20L=C3=BCnborg?= Date: Mon, 12 Sep 2016 08:48:41 +0200 Subject: [PATCH 009/339] [1.0] add nightwatch global with devServer's defined URL:Port (fix #241) (#257) * provide devServer URL, especially the port from /config/index.js as a global in night watch's browser object * fix missing colon * move variable assignment into the exported function b/c "browser" object is not avail outside. * remove whitespace * add support for process.env.PORT in night watch global --- template/test/e2e/nightwatch.conf.js | 6 +++++- template/test/e2e/specs/test.js | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/template/test/e2e/nightwatch.conf.js b/template/test/e2e/nightwatch.conf.js index 424f7f516c..00e85f6a46 100644 --- a/template/test/e2e/nightwatch.conf.js +++ b/template/test/e2e/nightwatch.conf.js @@ -1,4 +1,5 @@ require('babel-register') +var config = require('../../config') // http://nightwatchjs.org/guide#settings-file module.exports = { @@ -20,7 +21,10 @@ module.exports = { "default": { "selenium_port": 4444, "selenium_host": "localhost", - "silent": true + "silent": true, + "globals": { + "devServerURL": "http://localhost:" + (process.env.PORT || config.dev.port) + } }, "chrome": { diff --git a/template/test/e2e/specs/test.js b/template/test/e2e/specs/test.js index 49bc7f70a5..685880b450 100644 --- a/template/test/e2e/specs/test.js +++ b/template/test/e2e/specs/test.js @@ -3,8 +3,14 @@ module.exports = { 'default e2e tests': function (browser) { + + // automatically uses dev Server port from /config.index.js + // default: http://localhost:8080 + // see nightwatch.conf.js + var devServer = browser.globals.devServerURL + browser - .url('http://localhost:8080') + .url(devServer) .waitForElementVisible('#app', 5000) .assert.elementPresent('.logo') .assert.containsText('h1', 'Hello World!') From 5a0785097e5d0db79b60c8fe244ea62617afd383 Mon Sep 17 00:00:00 2001 From: zigomir Date: Thu, 18 Aug 2016 19:37:40 -0700 Subject: [PATCH 010/339] Vue 2.0 compat --- README.md | 2 ++ template/index.html | 2 +- template/package.json | 4 ++-- template/src/App.vue | 7 ++++++- template/src/main.js | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1cbcea3c70..72cb34f19c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ > A full-featured Webpack setup with hot-reload, lint-on-save, unit testing & css extraction. +> This template is Vue 2.0 compatible. For Vue 1.x please look at 1.0 branch. + ## Documentation Common topics are discussed in the [docs](http://vuejs-templates.github.io/webpack). Make sure to read it! diff --git a/template/index.html b/template/index.html index 52a1947de0..60edbcf0d2 100644 --- a/template/index.html +++ b/template/index.html @@ -5,7 +5,7 @@ {{ name }} - +
diff --git a/template/package.json b/template/package.json index c940a343e7..7e397ab08a 100644 --- a/template/package.json +++ b/template/package.json @@ -17,7 +17,7 @@ "lint": "eslint --ext .js,.vue src{{#unit}} test/unit/specs{{/unit}}{{#e2e}} test/e2e/specs{{/e2e}}"{{/lint}} }, "dependencies": { - "vue": "^1.0.21", + "vue": "^2.0.0-rc.2", "babel-runtime": "^6.0.0" }, "devDependencies": { @@ -84,7 +84,7 @@ "url-loader": "^0.5.7", "vue-hot-reload-api": "^1.2.0", "vue-html-loader": "^1.0.0", - "vue-loader": "^8.3.0", + "vue-loader": "^9.3.2", "vue-style-loader": "^1.0.0", "webpack": "^1.12.2", "webpack-dev-middleware": "^1.4.0", diff --git a/template/src/App.vue b/template/src/App.vue index 0d1d960438..d509cdb3c6 100644 --- a/template/src/App.vue +++ b/template/src/App.vue @@ -1,6 +1,6 @@