diff --git a/.circleci/config.yml b/.circleci/config.yml index d62410aa63..82da90d547 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,12 +23,6 @@ jobs: paths: - "node_modules" - # Build - - run: - name: Build - command: | - yarn build - # Test - run: name: Tests @@ -41,5 +35,5 @@ jobs: if [ "${CIRCLE_BRANCH}" == "dev" ]; then echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc - npm run release-next + ./scripts/release-next && npm publish --tag next fi diff --git a/.eslintrc.js b/.eslintrc.js index 69b6b59125..451755e074 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,7 +8,7 @@ module.exports = { browser: true, node: true }, - extends: 'standard', + extends: ['standard', 'standard-jsx'], // required to lint *.vue files plugins: [ 'html' diff --git a/.gitignore b/.gitignore index 6b2d6f7e1d..0d87892d25 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ package-lock.json npm-debug.log* # Other -.nuxt +.nuxt* .cache # Dist folder @@ -47,4 +47,4 @@ coverage .AppleDesktop Network Trash Folder Temporary Items -.apdisk \ No newline at end of file +.apdisk diff --git a/.travis.yml b/.travis.yml index a92abde5dc..3a8d45dd6d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,13 @@ language: node_js node_js: - "8" - - "6" + - "9" cache: yarn: true directories: - node_modules install: - yarn install - - yarn run build script: - yarn run test after_success: diff --git a/appveyor.yml b/appveyor.yml index f001912793..d9a0ff6927 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,8 +1,8 @@ # Test against the latest version of this Node.js version environment: matrix: - - nodejs_version: "6" - nodejs_version: "8" + - nodejs_version: "9" cache: - "%LOCALAPPDATA%\\Yarn" diff --git a/bin/nuxt-generate b/bin/nuxt-generate index c9fa725982..44a0b03cf2 100755 --- a/bin/nuxt-generate +++ b/bin/nuxt-generate @@ -33,7 +33,6 @@ if (argv.help) { Usage $ nuxt generate Options - --spa Launch in SPA mode --spa Launch in SPA mode --universal Launch in Universal mode (default) --config-file, -c Path to Nuxt.js config file (default: nuxt.config.js) diff --git a/build/rollup.config.js b/build/rollup.config.js deleted file mode 100755 index 3328377d48..0000000000 --- a/build/rollup.config.js +++ /dev/null @@ -1,116 +0,0 @@ -// Some parts brought from https://github.com/vuejs/vue/blob/dev/build/config.js -const { resolve } = require('path') -const rollupBabel = require('rollup-plugin-babel') -const rollupAlias = require('rollup-plugin-alias') -const rollupCommonJS = require('rollup-plugin-commonjs') -const rollupReplace = require('rollup-plugin-replace') -const rollupNodeResolve = require('rollup-plugin-node-resolve') -const packageJson = require('../package.json') - -const dependencies = Object.keys(packageJson.dependencies) -const version = packageJson.version || process.env.VERSION - -// ----------------------------- -// Banner -// ----------------------------- -const banner = - '/*!\n' + - ' * Nuxt.js v' + version + '\n' + - ' * Released under the MIT License.\n' + - ' */' - -// ----------------------------- -// Aliases -// ----------------------------- -const rootDir = resolve(__dirname, '..') -const libDir = resolve(rootDir, 'lib') -const distDir = resolve(rootDir, 'dist') - -const aliases = { - core: resolve(libDir, 'core/index.js'), - builder: resolve(libDir, 'builder/index.js'), - common: resolve(libDir, 'common/index.js'), - utils: resolve(libDir, 'common/utils.js'), - app: resolve(libDir, 'app') -} - -// ----------------------------- -// Builds -// ----------------------------- -const builds = { - nuxt: { - entry: resolve(libDir, 'index.js'), - file: resolve(distDir, 'nuxt.js') - }, - core: { - entry: resolve(libDir, 'core/index.js'), - file: resolve(distDir, 'core.js') - } -} - -// ----------------------------- -// Default config -// ----------------------------- -function genConfig(opts) { - const config = { - input: opts.entry, - output: { - file: opts.file, - format: 'cjs', - sourcemap: true - }, - external: ['fs', 'path', 'http', 'module', 'vue-server-renderer/server-plugin', 'vue-server-renderer/client-plugin'] - .concat(dependencies, opts.external), - banner: opts.banner || banner, - name: opts.modulename || 'Nuxt', - plugins: [ - rollupAlias(Object.assign({ - resolve: ['.js', '.json', '.jsx', '.ts'] - }, aliases, opts.alias)), - - rollupNodeResolve({ preferBuiltins: true }), - - rollupCommonJS(), - - rollupBabel(Object.assign({ - exclude: 'node_modules/**', - plugins: [ - ['transform-runtime', { 'helpers': false, 'polyfill': false }], - 'transform-async-to-generator', - 'array-includes', - 'external-helpers' - ], - presets: [ - ['env', { - targets: { - node: '6.11.0' - }, - modules: false - }] - ], - 'env': { - 'test': { - 'plugins': [ 'istanbul' ] - } - } - }, opts.babel)), - - rollupReplace({ __VERSION__: version }) - ].concat(opts.plugins || []) - } - - if (opts.env) { - config.plugins.push(rollupReplace({ - 'process.env.NODE_ENV': JSON.stringify(opts.env) - })) - } - - return config -} - -if (process.env.TARGET) { - module.exports = genConfig(builds[process.env.TARGET]) -} else { - exports.getBuild = name => genConfig(builds[name]) - exports.getAllBuilds = () => Object.keys(builds).map(name => genConfig(builds[name])) -} diff --git a/examples/hello-world-jsx/pages/about.vue b/examples/hello-world-jsx/pages/about.vue deleted file mode 100644 index 26ed2649b8..0000000000 --- a/examples/hello-world-jsx/pages/about.vue +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/examples/hello-world-jsx/pages/index.js b/examples/hello-world-jsx/pages/index.js deleted file mode 100644 index 675e8981f2..0000000000 --- a/examples/hello-world-jsx/pages/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - render(h) { - return
-

Welcome !

- About page -
- } -} diff --git a/examples/i18n/layouts/default.vue b/examples/i18n/layouts/default.vue index 8bf6defab9..46cf9e913e 100644 --- a/examples/i18n/layouts/default.vue +++ b/examples/i18n/layouts/default.vue @@ -4,10 +4,10 @@

Nuxt i18n