mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
commit
61231bfec3
@ -51,7 +51,7 @@ const builds = {
|
||||
// -----------------------------
|
||||
// Default config
|
||||
// -----------------------------
|
||||
function genConfig (opts) {
|
||||
function genConfig(opts) {
|
||||
const config = {
|
||||
input: opts.entry,
|
||||
output: {
|
||||
|
@ -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`)
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user