From 1a8089f9061fbf9dc3dbde4943cb296042041e18 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Sat, 25 Nov 2017 21:52:42 +0800 Subject: [PATCH] refactor: link build folder --- build/rollup.config.js | 2 +- build/start.js | 7 ++++--- package.json | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/rollup.config.js b/build/rollup.config.js index 346d3fab8a..3328377d48 100755 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -51,7 +51,7 @@ const builds = { // ----------------------------- // Default config // ----------------------------- -function genConfig (opts) { +function genConfig(opts) { const config = { input: opts.entry, output: { diff --git a/build/start.js b/build/start.js index 9f5eaecc28..aa8e474aec 100755 --- a/build/start.js +++ b/build/start.js @@ -3,7 +3,7 @@ const now = Date.now() const { readFileSync, readJSONSync, writeFileSync, copySync, removeSync } = require('fs-extra') -const { resolve, relative } = require('path') +const { resolve } = require('path') // Dirs const rootDir = resolve(__dirname, '..') @@ -42,6 +42,7 @@ requires = requires.filter(r => excludes.indexOf(r) === -1) let dependencies = {} requires.forEach(r => { if (!packageJSON.dependencies[r]) { + // eslint-disable-next-line no-console console.warn('Cannot resolve dependency version for ' + r) return } @@ -104,5 +105,5 @@ writeFileSync(startIndexjs, String(readFileSync(startIndexjs)).replace('./dist/n const binStart = resolve(startDir, 'bin/nuxt-start') writeFileSync(binStart, String(readFileSync(binStart)).replace(/nuxt start/g, 'nuxt-start')) -const ms = Date.now() - now -console.log(`Generated ${packageJSON.name}@${packageJSON.version} in ${ms}ms`) +// eslint-disable-next-line no-console +console.log(`Generated ${packageJSON.name}@${packageJSON.version} in ${Date.now() - now}ms`) diff --git a/package.json b/package.json index 6ce7f64402..621d70f41e 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "scripts": { "test": "npm run lint && cross-env NODE_ENV=test npm run build:nuxt && nyc ava --verbose --serial test/ -- && nyc report --reporter=html", "coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", - "lint": "eslint --ext .js,.vue bin/ lib/ test/ examples/", + "lint": "eslint --ext .js,.vue bin/ build/ lib/ test/ examples/", "build": "rimraf dist/ && npm run build:nuxt && npm run build:core", "build:nuxt": "rollup -c build/rollup.config.js --environment TARGET:nuxt", "build:core": "rollup -c build/rollup.config.js --environment TARGET:core",