mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
perf: remove rollup build
Using native node 8.x for less transpilations
This commit is contained in:
parent
ceef1f896f
commit
9b8cbed512
@ -23,12 +23,6 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- "node_modules"
|
- "node_modules"
|
||||||
|
|
||||||
# Build
|
|
||||||
- run:
|
|
||||||
name: Build
|
|
||||||
command: |
|
|
||||||
yarn build
|
|
||||||
|
|
||||||
# Test
|
# Test
|
||||||
- run:
|
- run:
|
||||||
name: Tests
|
name: Tests
|
||||||
|
@ -8,7 +8,6 @@ cache:
|
|||||||
- node_modules
|
- node_modules
|
||||||
install:
|
install:
|
||||||
- yarn install
|
- yarn install
|
||||||
- yarn run build
|
|
||||||
script:
|
script:
|
||||||
- yarn run test
|
- yarn run test
|
||||||
after_success:
|
after_success:
|
||||||
|
@ -1,113 +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', 'util', '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: [
|
|
||||||
'array-includes'
|
|
||||||
],
|
|
||||||
presets: [
|
|
||||||
['env', {
|
|
||||||
targets: {
|
|
||||||
node: '8.0.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]))
|
|
||||||
}
|
|
16
index.js
16
index.js
@ -1,16 +0,0 @@
|
|||||||
/*!
|
|
||||||
* Nuxt.js
|
|
||||||
* (c) 2016-2017 Chopin Brothers
|
|
||||||
* Core maintainer: Pooya (@pi0)
|
|
||||||
* Released under the MIT License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Node Source Map Support
|
|
||||||
// https://github.com/evanw/node-source-map-support
|
|
||||||
require('source-map-support').install()
|
|
||||||
|
|
||||||
// Fix babel flag
|
|
||||||
/* istanbul ignore else */
|
|
||||||
process.noDeprecation = true
|
|
||||||
|
|
||||||
module.exports = require('./dist/nuxt')
|
|
@ -1,30 +1,30 @@
|
|||||||
import { promisify } from 'util'
|
const { promisify } = require('util')
|
||||||
import _ from 'lodash'
|
const _ = require('lodash')
|
||||||
import chokidar from 'chokidar'
|
const chokidar = require('chokidar')
|
||||||
import fs, { remove, readFile, writeFile, mkdirp, existsSync } from 'fs-extra'
|
const { remove, readFile, writeFile, mkdirp, existsSync } = require('fs-extra')
|
||||||
import hash from 'hash-sum'
|
const hash = require('hash-sum')
|
||||||
import webpack from 'webpack'
|
const webpack = require('webpack')
|
||||||
import serialize from 'serialize-javascript'
|
const serialize = require('serialize-javascript')
|
||||||
import { join, resolve, basename, extname, dirname } from 'path'
|
const { join, resolve, basename, extname, dirname } = require('path')
|
||||||
import MFS from 'memory-fs'
|
const MFS = require('memory-fs')
|
||||||
import webpackDevMiddleware from 'webpack-dev-middleware'
|
const webpackDevMiddleware = require('webpack-dev-middleware')
|
||||||
import webpackHotMiddleware from 'webpack-hot-middleware'
|
const webpackHotMiddleware = require('webpack-hot-middleware')
|
||||||
import { r, wp, wChunk, createRoutes, sequence, relativeTo, isPureObject, waitFor, rmCache } from 'utils'
|
const { r, wp, wChunk, createRoutes, sequence, relativeTo, isPureObject, waitFor, rmCache } = require('../common/utils')
|
||||||
import Debug from 'debug'
|
const Debug = require('debug')
|
||||||
import Glob from 'glob'
|
const Glob = require('glob')
|
||||||
import clientWebpackConfig from './webpack/client.config.js'
|
const clientWebpackConfig = require('./webpack/client.config.js')
|
||||||
import serverWebpackConfig from './webpack/server.config.js'
|
const serverWebpackConfig = require('./webpack/server.config.js')
|
||||||
import dllWebpackConfig from './webpack/dll.config.js'
|
const dllWebpackConfig = require('./webpack/dll.config.js')
|
||||||
import vueLoaderConfig from './webpack/vue-loader.config'
|
const vueLoaderConfig = require('./webpack/vue-loader.config')
|
||||||
import styleLoader from './webpack/style-loader'
|
const styleLoader = require('./webpack/style-loader')
|
||||||
import { Options } from 'common'
|
const { Options } = require('../common')
|
||||||
|
|
||||||
const debug = Debug('nuxt:build')
|
const debug = Debug('nuxt:build')
|
||||||
debug.color = 2 // Force green color
|
debug.color = 2 // Force green color
|
||||||
|
|
||||||
const glob = promisify(Glob)
|
const glob = promisify(Glob)
|
||||||
|
|
||||||
export default class Builder {
|
module.exports = class Builder {
|
||||||
constructor(nuxt) {
|
constructor(nuxt) {
|
||||||
this.nuxt = nuxt
|
this.nuxt = nuxt
|
||||||
this.isStatic = false // Flag to know if the build is for a generated app
|
this.isStatic = false // Flag to know if the build is for a generated app
|
||||||
@ -145,9 +145,9 @@ export default class Builder {
|
|||||||
// Check if pages dir exists and warn if not
|
// Check if pages dir exists and warn if not
|
||||||
this._nuxtPages = typeof this.options.build.createRoutes !== 'function'
|
this._nuxtPages = typeof this.options.build.createRoutes !== 'function'
|
||||||
if (this._nuxtPages) {
|
if (this._nuxtPages) {
|
||||||
if (!fs.existsSync(join(this.options.srcDir, 'pages'))) {
|
if (!existsSync(join(this.options.srcDir, 'pages'))) {
|
||||||
let dir = this.options.srcDir
|
let dir = this.options.srcDir
|
||||||
if (fs.existsSync(join(this.options.srcDir, '..', 'pages'))) {
|
if (existsSync(join(this.options.srcDir, '..', 'pages'))) {
|
||||||
throw new Error(`No \`pages\` directory found in ${dir}. Did you mean to run \`nuxt\` in the parent (\`../\`) directory?`)
|
throw new Error(`No \`pages\` directory found in ${dir}. Did you mean to run \`nuxt\` in the parent (\`../\`) directory?`)
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Couldn't find a \`pages\` directory in ${dir}. Please create one under the project root`)
|
throw new Error(`Couldn't find a \`pages\` directory in ${dir}. Please create one under the project root`)
|
||||||
@ -247,7 +247,7 @@ export default class Builder {
|
|||||||
router: this.options.router,
|
router: this.options.router,
|
||||||
env: this.options.env,
|
env: this.options.env,
|
||||||
head: this.options.head,
|
head: this.options.head,
|
||||||
middleware: fs.existsSync(join(this.options.srcDir, 'middleware')),
|
middleware: existsSync(join(this.options.srcDir, 'middleware')),
|
||||||
store: this.options.store,
|
store: this.options.store,
|
||||||
css: this.options.css,
|
css: this.options.css,
|
||||||
plugins: this.plugins,
|
plugins: this.plugins,
|
||||||
@ -262,7 +262,7 @@ export default class Builder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// -- Layouts --
|
// -- Layouts --
|
||||||
if (fs.existsSync(resolve(this.options.srcDir, 'layouts'))) {
|
if (existsSync(resolve(this.options.srcDir, 'layouts'))) {
|
||||||
const layoutsFiles = await glob('layouts/**/*.{vue,js}', { cwd: this.options.srcDir })
|
const layoutsFiles = await glob('layouts/**/*.{vue,js}', { cwd: this.options.srcDir })
|
||||||
let hasErrorLayout = false
|
let hasErrorLayout = false
|
||||||
layoutsFiles.forEach((file) => {
|
layoutsFiles.forEach((file) => {
|
||||||
@ -326,7 +326,7 @@ export default class Builder {
|
|||||||
}
|
}
|
||||||
// Allow override templates using a file with same name in ${srcDir}/app
|
// Allow override templates using a file with same name in ${srcDir}/app
|
||||||
const customPath = r(this.options.srcDir, 'app', file)
|
const customPath = r(this.options.srcDir, 'app', file)
|
||||||
const customFileExists = fs.existsSync(customPath)
|
const customFileExists = existsSync(customPath)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
src: customFileExists
|
src: customFileExists
|
||||||
@ -463,7 +463,7 @@ export default class Builder {
|
|||||||
compiler.plugin('done', async (stats) => {
|
compiler.plugin('done', async (stats) => {
|
||||||
await this.nuxt.callHook('build:compiled', { name, compiler, stats })
|
await this.nuxt.callHook('build:compiled', { name, compiler, stats })
|
||||||
// Reload renderer if available
|
// Reload renderer if available
|
||||||
this.nuxt.renderer.loadResources(sharedFS || fs)
|
this.nuxt.renderer.loadResources(sharedFS || require('fs'))
|
||||||
// Resolve on next tick
|
// Resolve on next tick
|
||||||
process.nextTick(resolve)
|
process.nextTick(resolve)
|
||||||
})
|
})
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { copy, remove, writeFile, mkdirp, removeSync, existsSync } from 'fs-extra'
|
const { copy, remove, writeFile, mkdirp, removeSync, existsSync } = require('fs-extra')
|
||||||
import _ from 'lodash'
|
const _ = require('lodash')
|
||||||
import { resolve, join, dirname, sep } from 'path'
|
const { resolve, join, dirname, sep } = require('path')
|
||||||
import { minify } from 'html-minifier'
|
const { minify } = require('html-minifier')
|
||||||
import { isUrl, promisifyRoute, waitFor, flatRoutes } from 'utils'
|
const { isUrl, promisifyRoute, waitFor, flatRoutes } = require('../common/utils')
|
||||||
|
|
||||||
export default class Generator {
|
module.exports = class Generator {
|
||||||
constructor(nuxt, builder) {
|
constructor(nuxt, builder) {
|
||||||
this.nuxt = nuxt
|
this.nuxt = nuxt
|
||||||
this.options = nuxt.options
|
this.options = nuxt.options
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Builder from './builder'
|
const Builder = require('./builder')
|
||||||
import Generator from './generator'
|
const Generator = require('./generator')
|
||||||
|
|
||||||
export {
|
module.exports = {
|
||||||
Builder,
|
Builder,
|
||||||
Generator
|
Generator
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
import { cloneDeep } from 'lodash'
|
const { cloneDeep } = require('lodash')
|
||||||
import { join, resolve } from 'path'
|
const { join, resolve } = require('path')
|
||||||
import webpack from 'webpack'
|
const webpack = require('webpack')
|
||||||
import { isUrl, urlJoin } from 'utils'
|
const { isUrl, urlJoin } = require('../../common/utils')
|
||||||
import TimeFixPlugin from './plugins/timefix'
|
const TimeFixPlugin = require('./plugins/timefix')
|
||||||
import WarnFixPlugin from './plugins/warnfix'
|
const WarnFixPlugin = require('./plugins/warnfix')
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -14,8 +14,8 @@ import WarnFixPlugin from './plugins/warnfix'
|
|||||||
| webpack config files
|
| webpack config files
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
export default function webpackBaseConfig({ name, isServer }) {
|
module.exports = function webpackBaseConfig({ name, isServer }) {
|
||||||
const nodeModulesDir = join(__dirname, '..', 'node_modules')
|
const nodeModulesDir = join(this.options.nuxtDir, 'node_modules')
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
name,
|
name,
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { each } from 'lodash'
|
const { each } = require('lodash')
|
||||||
import webpack from 'webpack'
|
const webpack = require('webpack')
|
||||||
import VueSSRClientPlugin from 'vue-server-renderer/client-plugin'
|
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
|
||||||
import HTMLPlugin from 'html-webpack-plugin'
|
const HTMLPlugin = require('html-webpack-plugin')
|
||||||
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'
|
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin')
|
||||||
import UglifyJSPlugin from 'uglifyjs-webpack-plugin'
|
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
|
||||||
import ProgressBarPlugin from 'progress-bar-webpack-plugin'
|
const ProgressBarPlugin = require('progress-bar-webpack-plugin')
|
||||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
||||||
import { resolve } from 'path'
|
const { resolve } = require('path')
|
||||||
import { existsSync } from 'fs'
|
const { existsSync } = require('fs')
|
||||||
import Debug from 'debug'
|
const Debug = require('debug')
|
||||||
import base from './base.config.js'
|
const base = require('./base.config.js')
|
||||||
|
|
||||||
const debug = Debug('nuxt:build')
|
const debug = Debug('nuxt:build')
|
||||||
debug.color = 2 // Force green color
|
debug.color = 2 // Force green color
|
||||||
@ -24,7 +24,7 @@ debug.color = 2 // Force green color
|
|||||||
| In production, will generate public/dist/style.css
|
| In production, will generate public/dist/style.css
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
export default function webpackClientConfig() {
|
module.exports = function webpackClientConfig() {
|
||||||
let config = base.call(this, { name: 'client', isServer: false })
|
let config = base.call(this, { name: 'client', isServer: false })
|
||||||
|
|
||||||
// Entry points
|
// Entry points
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import webpack from 'webpack'
|
const webpack = require('webpack')
|
||||||
import { resolve } from 'path'
|
const { resolve } = require('path')
|
||||||
import ClientConfig from './client.config'
|
const ClientConfig = require('./client.config')
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -8,7 +8,7 @@ import ClientConfig from './client.config'
|
|||||||
| https://github.com/webpack/webpack/tree/master/examples/dll
|
| https://github.com/webpack/webpack/tree/master/examples/dll
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
export default function webpackDllConfig(_refConfig) {
|
module.exports = function webpackDllConfig(_refConfig) {
|
||||||
const refConfig = _refConfig || new ClientConfig()
|
const refConfig = _refConfig || new ClientConfig()
|
||||||
|
|
||||||
const name = refConfig.name + '-dll'
|
const name = refConfig.name + '-dll'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Taken from https://github.com/egoist/poi/blob/3e93c88c520db2d20c25647415e6ae0d3de61145/packages/poi/lib/webpack/timefix-plugin.js#L1-L16
|
// Taken from https://github.com/egoist/poi/blob/3e93c88c520db2d20c25647415e6ae0d3de61145/packages/poi/lib/webpack/timefix-plugin.js#L1-L16
|
||||||
// Thanks to @egoist
|
// Thanks to @egoist
|
||||||
export default class TimeFixPlugin {
|
module.exports = class TimeFixPlugin {
|
||||||
constructor(timefix = 11000) {
|
constructor(timefix = 11000) {
|
||||||
this.timefix = timefix
|
this.timefix = timefix
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export default class WarnFixPlugin {
|
module.exports = class WarnFixPlugin {
|
||||||
apply(compiler) /* istanbul ignore next */ {
|
apply(compiler) /* istanbul ignore next */ {
|
||||||
compiler.plugin('done', stats => {
|
compiler.plugin('done', stats => {
|
||||||
stats.compilation.warnings = stats.compilation.warnings.filter(warn => {
|
stats.compilation.warnings = stats.compilation.warnings.filter(warn => {
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
import webpack from 'webpack'
|
const webpack = require('webpack')
|
||||||
import VueSSRServerPlugin from 'vue-server-renderer/server-plugin'
|
const VueSSRServerPlugin = require('vue-server-renderer/server-plugin')
|
||||||
import nodeExternals from 'webpack-node-externals'
|
const nodeExternals = require('webpack-node-externals')
|
||||||
import { each } from 'lodash'
|
const { each } = require('lodash')
|
||||||
import { resolve } from 'path'
|
const { resolve } = require('path')
|
||||||
import { existsSync } from 'fs'
|
const { existsSync } = require('fs')
|
||||||
import base from './base.config.js'
|
const base = require('./base.config.js')
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Webpack Server Config
|
| Webpack Server Config
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
export default function webpackServerConfig() {
|
module.exports = function webpackServerConfig() {
|
||||||
let config = base.call(this, { name: 'server', isServer: true })
|
let config = base.call(this, { name: 'server', isServer: true })
|
||||||
|
|
||||||
// env object defined in nuxt.config.js
|
// env object defined in nuxt.config.js
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||||
import { join } from 'path'
|
const { join } = require('path')
|
||||||
|
|
||||||
export default function styleLoader(ext, loaders = [], isVueLoader = false) {
|
module.exports = function styleLoader(ext, loaders = [], isVueLoader = false) {
|
||||||
// Normalize loaders
|
// Normalize loaders
|
||||||
loaders = (Array.isArray(loaders) ? loaders : [loaders]).map(loader => {
|
loaders = (Array.isArray(loaders) ? loaders : [loaders]).map(loader => {
|
||||||
if (typeof loader === 'string') {
|
if (typeof loader === 'string') {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export default function vueLoader({ isServer }) {
|
module.exports = function vueLoader({ isServer }) {
|
||||||
// https://vue-loader.vuejs.org/en
|
// https://vue-loader.vuejs.org/en
|
||||||
const config = {
|
const config = {
|
||||||
postcss: this.options.build.postcss,
|
postcss: this.options.build.postcss,
|
||||||
|
@ -8,10 +8,9 @@ pe.skipPackage('regenerator-runtime')
|
|||||||
pe.skipPackage('babel-runtime')
|
pe.skipPackage('babel-runtime')
|
||||||
pe.skipPackage('core-js')
|
pe.skipPackage('core-js')
|
||||||
|
|
||||||
// Skip dist artifacts and Node internals
|
// Skip node internals
|
||||||
const skipFiles = [ 'nuxt.js', 'core.js' ]
|
|
||||||
pe.skip((traceLine, lineNumber) => {
|
pe.skip((traceLine, lineNumber) => {
|
||||||
if (!traceLine.file || skipFiles.indexOf(traceLine.file) !== -1) {
|
if (!traceLine.file) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
import * as Utils from './utils'
|
const Utils = require('./utils')
|
||||||
import Options from './options'
|
const Options = require('./options')
|
||||||
|
|
||||||
export default {
|
module.exports = {
|
||||||
Utils,
|
|
||||||
Options
|
|
||||||
}
|
|
||||||
|
|
||||||
export {
|
|
||||||
Utils,
|
Utils,
|
||||||
Options
|
Options
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import _ from 'lodash'
|
const _ = require('lodash')
|
||||||
import Debug from 'debug'
|
const Debug = require('debug')
|
||||||
import { join, resolve } from 'path'
|
const { join, resolve } = require('path')
|
||||||
import { existsSync } from 'fs'
|
const { existsSync } = require('fs')
|
||||||
import { isUrl, isPureObject } from 'utils'
|
const { isUrl, isPureObject } = require('../common/utils')
|
||||||
|
|
||||||
const debug = Debug('nuxt:build')
|
const debug = Debug('nuxt:build')
|
||||||
debug.color = 2 // Force green color
|
debug.color = 2 // Force green color
|
||||||
|
|
||||||
const Options = {}
|
const Options = {}
|
||||||
|
|
||||||
export default Options
|
module.exports = Options
|
||||||
|
|
||||||
Options.from = function (_options) {
|
Options.from = function (_options) {
|
||||||
// Clone options to prevent unwanted side-effects
|
// Clone options to prevent unwanted side-effects
|
||||||
@ -203,8 +203,8 @@ Options.defaults = {
|
|||||||
debug: undefined, // Will be equal to dev if not provided
|
debug: undefined, // Will be equal to dev if not provided
|
||||||
buildDir: '.nuxt',
|
buildDir: '.nuxt',
|
||||||
cacheDir: '.cache',
|
cacheDir: '.cache',
|
||||||
nuxtDir: resolve(__dirname, '..'), // Relative to dist
|
nuxtDir: resolve(__dirname, '../..'),
|
||||||
nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
|
nuxtAppDir: resolve(__dirname, '../app'),
|
||||||
build: {
|
build: {
|
||||||
analyze: false,
|
analyze: false,
|
||||||
dll: false,
|
dll: false,
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { resolve, relative, sep } from 'path'
|
const { resolve, relative, sep } = require('path')
|
||||||
import _ from 'lodash'
|
const _ = require('lodash')
|
||||||
|
|
||||||
export function encodeHtml(str) {
|
exports.encodeHtml = function encodeHtml(str) {
|
||||||
return str.replace(/</g, '<').replace(/>/g, '>')
|
return str.replace(/</g, '<').replace(/>/g, '>')
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getContext(req, res) {
|
exports.getContext = function getContext(req, res) {
|
||||||
return { req, res }
|
return { req, res }
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setAnsiColors(ansiHTML) {
|
exports.setAnsiColors = function setAnsiColors(ansiHTML) {
|
||||||
ansiHTML.setColors({
|
ansiHTML.setColors({
|
||||||
reset: ['efefef', 'a6004c'],
|
reset: ['efefef', 'a6004c'],
|
||||||
darkgrey: '5a012b',
|
darkgrey: '5a012b',
|
||||||
@ -22,19 +22,19 @@ export function setAnsiColors(ansiHTML) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function waitFor(ms) {
|
exports.waitFor = async function waitFor(ms) {
|
||||||
return new Promise(resolve => setTimeout(resolve, (ms || 0)))
|
return new Promise(resolve => setTimeout(resolve, (ms || 0)))
|
||||||
}
|
}
|
||||||
|
|
||||||
export function urlJoin() {
|
exports.urlJoin = function urlJoin() {
|
||||||
return [].slice.call(arguments).join('/').replace(/\/+/g, '/').replace(':/', '://')
|
return [].slice.call(arguments).join('/').replace(/\/+/g, '/').replace(':/', '://')
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isUrl(url) {
|
exports.isUrl = function isUrl(url) {
|
||||||
return (url.indexOf('http') === 0 || url.indexOf('//') === 0)
|
return (url.indexOf('http') === 0 || url.indexOf('//') === 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function promisifyRoute(fn, ...args) {
|
exports.promisifyRoute = function promisifyRoute(fn, ...args) {
|
||||||
// If routes is an array
|
// If routes is an array
|
||||||
if (Array.isArray(fn)) {
|
if (Array.isArray(fn)) {
|
||||||
return Promise.resolve(fn)
|
return Promise.resolve(fn)
|
||||||
@ -57,15 +57,15 @@ export function promisifyRoute(fn, ...args) {
|
|||||||
return promise
|
return promise
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sequence(tasks, fn) {
|
exports.sequence = function sequence(tasks, fn) {
|
||||||
return tasks.reduce((promise, task) => promise.then(() => fn(task)), Promise.resolve())
|
return tasks.reduce((promise, task) => promise.then(() => fn(task)), Promise.resolve())
|
||||||
}
|
}
|
||||||
|
|
||||||
export function parallel(tasks, fn) {
|
exports.parallel = function parallel(tasks, fn) {
|
||||||
return Promise.all(tasks.map(task => fn(task)))
|
return Promise.all(tasks.map(task => fn(task)))
|
||||||
}
|
}
|
||||||
|
|
||||||
export function chainFn(base, fn) {
|
exports.chainFn = function chainFn(base, fn) {
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (!(fn instanceof Function)) {
|
if (!(fn instanceof Function)) {
|
||||||
return
|
return
|
||||||
@ -88,13 +88,13 @@ export function chainFn(base, fn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isPureObject(o) {
|
exports.isPureObject = function isPureObject(o) {
|
||||||
return !Array.isArray(o) && typeof o === 'object'
|
return !Array.isArray(o) && typeof o === 'object'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isWindows = /^win/.test(process.platform)
|
const isWindows = exports.isWindows = /^win/.test(process.platform)
|
||||||
|
|
||||||
export function wp(p = '') {
|
const wp = exports.wp = function wp(p = '') {
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (isWindows) {
|
if (isWindows) {
|
||||||
return p.replace(/\\/g, '\\\\')
|
return p.replace(/\\/g, '\\\\')
|
||||||
@ -102,7 +102,7 @@ export function wp(p = '') {
|
|||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
export function wChunk(p = '') {
|
exports.wChunk = function wChunk(p = '') {
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
if (isWindows) {
|
if (isWindows) {
|
||||||
return p.replace(/\//g, '_')
|
return p.replace(/\//g, '_')
|
||||||
@ -114,7 +114,7 @@ const reqSep = /\//g
|
|||||||
const sysSep = _.escapeRegExp(sep)
|
const sysSep = _.escapeRegExp(sep)
|
||||||
const normalize = string => string.replace(reqSep, sysSep)
|
const normalize = string => string.replace(reqSep, sysSep)
|
||||||
|
|
||||||
export function r() {
|
const r = exports.r = function r() {
|
||||||
let args = Array.prototype.slice.apply(arguments)
|
let args = Array.prototype.slice.apply(arguments)
|
||||||
let lastArg = _.last(args)
|
let lastArg = _.last(args)
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ export function r() {
|
|||||||
return wp(resolve(...args.map(normalize)))
|
return wp(resolve(...args.map(normalize)))
|
||||||
}
|
}
|
||||||
|
|
||||||
export function relativeTo() {
|
exports.relativeTo = function relativeTo() {
|
||||||
let args = Array.prototype.slice.apply(arguments)
|
let args = Array.prototype.slice.apply(arguments)
|
||||||
let dir = args.shift()
|
let dir = args.shift()
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ export function relativeTo() {
|
|||||||
return wp(rp)
|
return wp(rp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function flatRoutes(router, path = '', routes = []) {
|
exports.flatRoutes = function flatRoutes(router, path = '', routes = []) {
|
||||||
router.forEach((r) => {
|
router.forEach((r) => {
|
||||||
if (!r.path.includes(':') && !r.path.includes('*')) {
|
if (!r.path.includes(':') && !r.path.includes('*')) {
|
||||||
/* istanbul ignore if */
|
/* istanbul ignore if */
|
||||||
@ -163,7 +163,7 @@ export function flatRoutes(router, path = '', routes = []) {
|
|||||||
return routes
|
return routes
|
||||||
}
|
}
|
||||||
|
|
||||||
export function cleanChildrenRoutes(routes, isChild = false) {
|
function cleanChildrenRoutes(routes, isChild = false) {
|
||||||
let start = -1
|
let start = -1
|
||||||
let routesIndex = []
|
let routesIndex = []
|
||||||
routes.forEach((route) => {
|
routes.forEach((route) => {
|
||||||
@ -209,7 +209,7 @@ export function cleanChildrenRoutes(routes, isChild = false) {
|
|||||||
return routes
|
return routes
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createRoutes(files, srcDir) {
|
exports.createRoutes = function createRoutes(files, srcDir) {
|
||||||
let routes = []
|
let routes = []
|
||||||
files.forEach((file) => {
|
files.forEach((file) => {
|
||||||
let keys = file.replace(/^pages/, '').replace(/\.(vue|js)$/, '').replace(/\/{2,}/g, '/').split('/').slice(1)
|
let keys = file.replace(/^pages/, '').replace(/\.(vue|js)$/, '').replace(/\/{2,}/g, '/').split('/').slice(1)
|
||||||
@ -269,7 +269,7 @@ export function createRoutes(files, srcDir) {
|
|||||||
return cleanChildrenRoutes(routes)
|
return cleanChildrenRoutes(routes)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function rmCache(path) {
|
exports.rmCache = function rmCache(path) {
|
||||||
const mod = require.cache[path]
|
const mod = require.cache[path]
|
||||||
delete require.cache[path]
|
delete require.cache[path]
|
||||||
if (mod.parent && mod.parent.children) {
|
if (mod.parent && mod.parent.children) {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Options, Utils } from 'common'
|
const { Options, Utils } = require('../common')
|
||||||
import Module from './module'
|
const Module = require('./module')
|
||||||
import Nuxt from './nuxt'
|
const Nuxt = require('./nuxt')
|
||||||
import Renderer from './renderer'
|
const Renderer = require('./renderer')
|
||||||
|
|
||||||
export {
|
module.exports = {
|
||||||
Nuxt,
|
Nuxt,
|
||||||
Module,
|
Module,
|
||||||
Renderer,
|
Renderer,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
import Vue from 'vue'
|
const Vue = require('vue')
|
||||||
import VueMeta from 'vue-meta'
|
const VueMeta = require('vue-meta')
|
||||||
import VueServerRenderer from 'vue-server-renderer'
|
const VueServerRenderer = require('vue-server-renderer')
|
||||||
import LRU from 'lru-cache'
|
const LRU = require('lru-cache')
|
||||||
|
|
||||||
export default class MetaRenderer {
|
module.exports = class MetaRenderer {
|
||||||
constructor(nuxt, renderer) {
|
constructor(nuxt, renderer) {
|
||||||
this.nuxt = nuxt
|
this.nuxt = nuxt
|
||||||
this.renderer = renderer
|
this.renderer = renderer
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import path from 'path'
|
const path = require('path')
|
||||||
import fs from 'fs'
|
const fs = require('fs')
|
||||||
import { uniq } from 'lodash'
|
const { uniq } = require('lodash')
|
||||||
import hash from 'hash-sum'
|
const hash = require('hash-sum')
|
||||||
import { chainFn, sequence } from 'utils'
|
const { chainFn, sequence } = require('../common/utils')
|
||||||
import Debug from 'debug'
|
const Debug = require('debug')
|
||||||
|
|
||||||
const debug = Debug('nuxt:module')
|
const debug = Debug('nuxt:module')
|
||||||
|
|
||||||
export default class ModuleContainer {
|
module.exports = class ModuleContainer {
|
||||||
constructor(nuxt) {
|
constructor(nuxt) {
|
||||||
this.nuxt = nuxt
|
this.nuxt = nuxt
|
||||||
this.options = nuxt.options
|
this.options = nuxt.options
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
import chalk from 'chalk'
|
const Debug = require('debug')
|
||||||
import { Options } from 'common'
|
const enableDestroy = require('server-destroy')
|
||||||
import { sequence } from 'utils'
|
const Module = require('module')
|
||||||
import ModuleContainer from './module'
|
const { isPlainObject } = require('lodash')
|
||||||
import Renderer from './renderer'
|
const chalk = require('chalk')
|
||||||
import Debug from 'debug'
|
const { Options } = require('../common')
|
||||||
import enableDestroy from 'server-destroy'
|
const { sequence } = require('../common/utils')
|
||||||
import Module from 'module'
|
const { join, resolve } = require('path')
|
||||||
import { isPlainObject } from 'lodash'
|
const { version } = require('../../package.json')
|
||||||
import { join, resolve } from 'path'
|
const ModuleContainer = require('./module')
|
||||||
|
const Renderer = require('./renderer')
|
||||||
|
|
||||||
const debug = Debug('nuxt:')
|
const debug = Debug('nuxt:')
|
||||||
debug.color = 5
|
debug.color = 5
|
||||||
|
|
||||||
export default class Nuxt {
|
module.exports = class Nuxt {
|
||||||
constructor(options = {}) {
|
constructor(options = {}) {
|
||||||
this.options = Options.from(options)
|
this.options = Options.from(options)
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ export default class Nuxt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get version() {
|
static get version() {
|
||||||
return '__VERSION__'
|
return version
|
||||||
}
|
}
|
||||||
|
|
||||||
async ready() {
|
async ready() {
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
import ansiHTML from 'ansi-html'
|
const ansiHTML = require('ansi-html')
|
||||||
import serialize from 'serialize-javascript'
|
const serialize = require('serialize-javascript')
|
||||||
import generateETag from 'etag'
|
const generateETag = require('etag')
|
||||||
import fresh from 'fresh'
|
const fresh = require('fresh')
|
||||||
import serveStatic from 'serve-static'
|
const serveStatic = require('serve-static')
|
||||||
import compression from 'compression'
|
const compression = require('compression')
|
||||||
import _ from 'lodash'
|
const _ = require('lodash')
|
||||||
import { join, resolve } from 'path'
|
const { join, resolve } = require('path')
|
||||||
import fs from 'fs-extra'
|
const fs = require('fs-extra')
|
||||||
import { createBundleRenderer } from 'vue-server-renderer'
|
const { createBundleRenderer } = require('vue-server-renderer')
|
||||||
import { getContext, setAnsiColors, isUrl, waitFor } from 'utils'
|
const { getContext, setAnsiColors, isUrl, waitFor } = require('../common/utils')
|
||||||
import Debug from 'debug'
|
const Debug = require('debug')
|
||||||
import Youch from '@nuxtjs/youch'
|
const Youch = require('@nuxtjs/youch')
|
||||||
import { SourceMapConsumer } from 'source-map'
|
const { SourceMapConsumer } = require('source-map')
|
||||||
import connect from 'connect'
|
const connect = require('connect')
|
||||||
import { Options } from 'common'
|
const { Options } = require('../common')
|
||||||
import MetaRenderer from './meta'
|
const MetaRenderer = require('./meta')
|
||||||
|
|
||||||
const debug = Debug('nuxt:render')
|
const debug = Debug('nuxt:render')
|
||||||
debug.color = 4 // Force blue color
|
debug.color = 4 // Force blue color
|
||||||
@ -23,7 +23,7 @@ setAnsiColors(ansiHTML)
|
|||||||
|
|
||||||
let jsdom = null
|
let jsdom = null
|
||||||
|
|
||||||
export default class Renderer {
|
module.exports = class Renderer {
|
||||||
constructor(nuxt) {
|
constructor(nuxt) {
|
||||||
this.nuxt = nuxt
|
this.nuxt = nuxt
|
||||||
this.options = nuxt.options
|
this.options = nuxt.options
|
||||||
|
13
lib/index.js
13
lib/index.js
@ -1,4 +1,11 @@
|
|||||||
import * as core from './core'
|
/*!
|
||||||
import * as builder from './builder'
|
* Nuxt.js
|
||||||
|
* (c) 2016-2017 Chopin Brothers
|
||||||
|
* Core maintainer: Pooya Parsa (@pi0)
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
export default Object.assign({}, core, builder)
|
const core = require('./core')
|
||||||
|
const builder = require('./builder')
|
||||||
|
|
||||||
|
module.exports = Object.assign({}, core, builder)
|
||||||
|
19
package.json
19
package.json
@ -13,7 +13,7 @@
|
|||||||
"name": "Pooya Parsa (@pi0)"
|
"name": "Pooya Parsa (@pi0)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"main": "./index.js",
|
"main": "./lib/index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -21,7 +21,6 @@
|
|||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
"dist",
|
|
||||||
"lib",
|
"lib",
|
||||||
"index.js"
|
"index.js"
|
||||||
],
|
],
|
||||||
@ -47,14 +46,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && cross-env NODE_ENV=test npm run build:nuxt && nyc ava --verbose --serial test/ -- && nyc report --reporter=html",
|
"test": "npm run lint && nyc ava --verbose --serial test/ -- && nyc report --reporter=html",
|
||||||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
|
||||||
"lint": "eslint --ext .js,.vue bin/* build/ 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",
|
|
||||||
"watch": "npm run build:nuxt -- -w",
|
|
||||||
"make-start": "node ./build/start.js",
|
|
||||||
"precommit": "npm run lint",
|
"precommit": "npm run lint",
|
||||||
"postinstall": "opencollective postinstall || exit 0",
|
"postinstall": "opencollective postinstall || exit 0",
|
||||||
"release-next": "npm run build && node ./build/release-next && npm publish --tag next"
|
"release-next": "npm run build && node ./build/release-next && npm publish --tag next"
|
||||||
@ -106,7 +100,6 @@
|
|||||||
"serve-static": "^1.13.1",
|
"serve-static": "^1.13.1",
|
||||||
"server-destroy": "^1.0.1",
|
"server-destroy": "^1.0.1",
|
||||||
"source-map": "^0.6.1",
|
"source-map": "^0.6.1",
|
||||||
"source-map-support": "^0.5.0",
|
|
||||||
"style-resources-loader": "^1.0.0",
|
"style-resources-loader": "^1.0.0",
|
||||||
"uglifyjs-webpack-plugin": "^1.1.2",
|
"uglifyjs-webpack-plugin": "^1.1.2",
|
||||||
"url-loader": "^0.6.2",
|
"url-loader": "^0.6.2",
|
||||||
@ -149,14 +142,6 @@
|
|||||||
"puppeteer": "^0.13.0",
|
"puppeteer": "^0.13.0",
|
||||||
"request": "^2.83.0",
|
"request": "^2.83.0",
|
||||||
"request-promise-native": "^1.0.5",
|
"request-promise-native": "^1.0.5",
|
||||||
"rimraf": "^2.6.2",
|
|
||||||
"rollup": "^0.52.1",
|
|
||||||
"rollup-plugin-alias": "^1.4.0",
|
|
||||||
"rollup-plugin-babel": "^3.0.2",
|
|
||||||
"rollup-plugin-commonjs": "^8.2.6",
|
|
||||||
"rollup-plugin-node-resolve": "^3.0.0",
|
|
||||||
"rollup-plugin-replace": "^2.0.0",
|
|
||||||
"rollup-watch": "^4.3.1",
|
|
||||||
"std-mocks": "^1.0.1",
|
"std-mocks": "^1.0.1",
|
||||||
"uglify-js": "^3.2.2"
|
"uglify-js": "^3.2.2"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { Nuxt, Options } from '../index'
|
import { Nuxt, Options } from '..'
|
||||||
import { version } from '../package.json'
|
import { version } from '../package.json'
|
||||||
|
|
||||||
test('Nuxt.version is same as package', t => {
|
test('Nuxt.version is same as package', t => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { Nuxt, Builder } from '../index'
|
import { Nuxt, Builder } from '..'
|
||||||
import * as browser from './helpers/browser'
|
import * as browser from './helpers/browser'
|
||||||
|
|
||||||
const port = 4003
|
const port = 4003
|
||||||
|
@ -2,7 +2,7 @@ import test from 'ava'
|
|||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import stdMocks from 'std-mocks'
|
import stdMocks from 'std-mocks'
|
||||||
// import rp from 'request-promise-native'
|
// import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder, Utils } from '../index.js'
|
import { Nuxt, Builder, Utils } from '..'
|
||||||
import { truncateSync, readFileSync, writeFileSync } from 'fs'
|
import { truncateSync, readFileSync, writeFileSync } from 'fs'
|
||||||
|
|
||||||
const port = 4001
|
const port = 4001
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { Nuxt, Builder, Generator } from '../index.js'
|
import { Nuxt, Builder, Generator } from '..'
|
||||||
|
|
||||||
test('Fail with routes() which throw an error', async t => {
|
test('Fail with routes() which throw an error', async t => {
|
||||||
const options = {
|
const options = {
|
||||||
|
@ -5,7 +5,7 @@ import http from 'http'
|
|||||||
import serveStatic from 'serve-static'
|
import serveStatic from 'serve-static'
|
||||||
import finalhandler from 'finalhandler'
|
import finalhandler from 'finalhandler'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder, Generator } from '../index.js'
|
import { Nuxt, Builder, Generator } from '..'
|
||||||
|
|
||||||
const port = 4002
|
const port = 4002
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -5,7 +5,7 @@ import http from 'http'
|
|||||||
import serveStatic from 'serve-static'
|
import serveStatic from 'serve-static'
|
||||||
import finalhandler from 'finalhandler'
|
import finalhandler from 'finalhandler'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder, Generator } from '../index.js'
|
import { Nuxt, Builder, Generator } from '..'
|
||||||
|
|
||||||
const port = 4002
|
const port = 4002
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -2,7 +2,7 @@ import test from 'ava'
|
|||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import stdMocks from 'std-mocks'
|
import stdMocks from 'std-mocks'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const port = 4003
|
const port = 4003
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { Nuxt, Builder, Utils } from '../index.js'
|
import { Nuxt, Builder, Utils } from '..'
|
||||||
import * as browser from './helpers/browser'
|
import * as browser from './helpers/browser'
|
||||||
|
|
||||||
const port = 4005
|
const port = 4005
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const port = 4004
|
const port = 4004
|
||||||
// const url = (route) => 'http://localhost:' + port + route
|
// const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -2,10 +2,10 @@ import { promisify } from 'util'
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve, sep } from 'path'
|
import { resolve, sep } from 'path'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Utils } from '../index.js'
|
|
||||||
import { exec, spawn } from 'child_process'
|
import { exec, spawn } from 'child_process'
|
||||||
|
import { Utils } from '..'
|
||||||
|
|
||||||
const execify = promisify(exec, { multiArgs: true })
|
const execify = promisify(exec)
|
||||||
const rootDir = resolve(__dirname, 'fixtures/basic')
|
const rootDir = resolve(__dirname, 'fixtures/basic')
|
||||||
|
|
||||||
const port = 4011
|
const port = 4011
|
||||||
@ -14,7 +14,7 @@ const url = (route) => 'http://localhost:' + port + route
|
|||||||
test('bin/nuxt-build', async t => {
|
test('bin/nuxt-build', async t => {
|
||||||
const binBuild = resolve(__dirname, '..', 'bin', 'nuxt-build')
|
const binBuild = resolve(__dirname, '..', 'bin', 'nuxt-build')
|
||||||
|
|
||||||
const [ stdout, stderr ] = await execify(`node ${binBuild} ${rootDir}`)
|
const { stdout, stderr } = await execify(`node ${binBuild} ${rootDir}`)
|
||||||
|
|
||||||
t.true(stdout.includes('server-bundle.json'))
|
t.true(stdout.includes('server-bundle.json'))
|
||||||
t.true(stderr.includes('Building done'))
|
t.true(stderr.includes('Building done'))
|
||||||
@ -82,7 +82,7 @@ test('bin/nuxt-start', async t => {
|
|||||||
test('bin/nuxt-generate', async t => {
|
test('bin/nuxt-generate', async t => {
|
||||||
const binGenerate = resolve(__dirname, '..', 'bin', 'nuxt-generate')
|
const binGenerate = resolve(__dirname, '..', 'bin', 'nuxt-generate')
|
||||||
|
|
||||||
const [ stdout, stderr ] = await execify(`node ${binGenerate} ${rootDir}`)
|
const { stdout, stderr } = await execify(`node ${binGenerate} ${rootDir}`)
|
||||||
|
|
||||||
t.true(stdout.includes('server-bundle.json'))
|
t.true(stdout.includes('server-bundle.json'))
|
||||||
t.true(stderr.includes('Destination folder cleaned'))
|
t.true(stderr.includes('Destination folder cleaned'))
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const port = 4009
|
const port = 4009
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -2,7 +2,7 @@ import test from 'ava'
|
|||||||
import stdMocks from 'std-mocks'
|
import stdMocks from 'std-mocks'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const port = 4010
|
const port = 4010
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -3,7 +3,7 @@ import test from 'ava'
|
|||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import stdMocks from 'std-mocks'
|
import stdMocks from 'std-mocks'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const readFile = promisify(fs.readFile)
|
const readFile = promisify(fs.readFile)
|
||||||
const rootDir = resolve(__dirname, './fixtures/dll')
|
const rootDir = resolve(__dirname, './fixtures/dll')
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
import { promisify } from 'util'
|
import { promisify } from 'util'
|
||||||
|
|
||||||
const readFile = promisify(fs.readFile)
|
const readFile = promisify(fs.readFile)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const port = 4005
|
const port = 4005
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
import express from 'express'
|
import express from 'express'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
|
|
||||||
|
3
test/fixtures/basic/nuxt.config.js
vendored
3
test/fixtures/basic/nuxt.config.js
vendored
@ -1,5 +1,3 @@
|
|||||||
const path = require('path')
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
generate: {
|
generate: {
|
||||||
routes: [
|
routes: [
|
||||||
@ -10,7 +8,6 @@ module.exports = {
|
|||||||
interval: 200,
|
interval: 200,
|
||||||
subFolders: true
|
subFolders: true
|
||||||
},
|
},
|
||||||
modulesDir: path.join(__dirname, '..', '..', '..', 'node_modules'),
|
|
||||||
hooks: {
|
hooks: {
|
||||||
ready(nuxt) {
|
ready(nuxt) {
|
||||||
nuxt.__hook_called__ = true
|
nuxt.__hook_called__ = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { Nuxt, Generator } from '../index.js'
|
import { Nuxt, Generator } from '..'
|
||||||
|
|
||||||
test('initRoutes with routes (fn => array)', async t => {
|
test('initRoutes with routes (fn => array)', async t => {
|
||||||
const array = ['/1', '/2', '/3', '/4']
|
const array = ['/1', '/2', '/3', '/4']
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
test('Nuxt.js Class', t => {
|
test('Nuxt.js Class', t => {
|
||||||
t.is(typeof Nuxt, 'function')
|
t.is(typeof Nuxt, 'function')
|
||||||
|
@ -2,7 +2,7 @@ import test from 'ava'
|
|||||||
import stdMocks from 'std-mocks'
|
import stdMocks from 'std-mocks'
|
||||||
import { resolve, normalize } from 'path'
|
import { resolve, normalize } from 'path'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const port = 4006
|
const port = 4006
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import stdMocks from 'std-mocks'
|
import stdMocks from 'std-mocks'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
let nuxt = null
|
let nuxt = null
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import ansiHTML from 'ansi-html'
|
import ansiHTML from 'ansi-html'
|
||||||
import { Utils } from '../index.js'
|
import { Utils } from '..'
|
||||||
|
|
||||||
test('encodeHtml', t => {
|
test('encodeHtml', t => {
|
||||||
const html = '<h1>Hello</h1>'
|
const html = '<h1>Hello</h1>'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import test from 'ava'
|
import test from 'ava'
|
||||||
import { resolve } from 'path'
|
import { resolve } from 'path'
|
||||||
import rp from 'request-promise-native'
|
import rp from 'request-promise-native'
|
||||||
import { Nuxt, Builder } from '../index.js'
|
import { Nuxt, Builder } from '..'
|
||||||
|
|
||||||
const port = 4007
|
const port = 4007
|
||||||
const url = (route) => 'http://localhost:' + port + route
|
const url = (route) => 'http://localhost:' + port + route
|
||||||
|
170
yarn.lock
170
yarn.lock
@ -110,8 +110,8 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@std/esm/-/esm-0.16.0.tgz#2a7a33ecb7f1701cebd4c87df6d0d945ed51f730"
|
resolved "https://registry.yarnpkg.com/@std/esm/-/esm-0.16.0.tgz#2a7a33ecb7f1701cebd4c87df6d0d945ed51f730"
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "8.0.57"
|
version "8.0.58"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.57.tgz#e5d8b4dc112763e35cfc51988f4f38da3c486d99"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90"
|
||||||
|
|
||||||
abab@^1.0.3:
|
abab@^1.0.3:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
@ -1222,12 +1222,6 @@ browser-process-hrtime@^0.1.2:
|
|||||||
version "0.1.2"
|
version "0.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e"
|
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e"
|
||||||
|
|
||||||
browser-resolve@^1.11.0:
|
|
||||||
version "1.11.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce"
|
|
||||||
dependencies:
|
|
||||||
resolve "1.1.7"
|
|
||||||
|
|
||||||
browserify-aes@^1.0.0, browserify-aes@^1.0.4:
|
browserify-aes@^1.0.0, browserify-aes@^1.0.4:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f"
|
resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.1.1.tgz#38b7ab55edb806ff2dcda1a7f1620773a477c49f"
|
||||||
@ -1310,7 +1304,7 @@ buffer@^4.3.0:
|
|||||||
ieee754 "^1.1.4"
|
ieee754 "^1.1.4"
|
||||||
isarray "^1.0.0"
|
isarray "^1.0.0"
|
||||||
|
|
||||||
builtin-modules@^1.0.0, builtin-modules@^1.1.0, builtin-modules@^1.1.1:
|
builtin-modules@^1.0.0, builtin-modules@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
||||||
|
|
||||||
@ -1416,14 +1410,10 @@ caniuse-api@^2.0.0:
|
|||||||
lodash.uniq "^4.5.0"
|
lodash.uniq "^4.5.0"
|
||||||
|
|
||||||
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
||||||
version "1.0.30000780"
|
version "1.0.30000782"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000780.tgz#8d1977561d00ff0f0ed2b6b66140328ab4504c0a"
|
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000782.tgz#d8815bce1578c350aced1132507301205e0fab53"
|
||||||
|
|
||||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000780:
|
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000780, caniuse-lite@^1.0.30000782:
|
||||||
version "1.0.30000780"
|
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000780.tgz#1f9095f2efd4940e0ba6c5992ab7a9b64cc35ba4"
|
|
||||||
|
|
||||||
caniuse-lite@^1.0.30000782:
|
|
||||||
version "1.0.30000782"
|
version "1.0.30000782"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000782.tgz#5b82b8c385f25348745c471ca51320afb1b7f254"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000782.tgz#5b82b8c385f25348745c471ca51320afb1b7f254"
|
||||||
|
|
||||||
@ -1829,8 +1819,8 @@ core-js@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
|
||||||
|
|
||||||
core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0:
|
core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0:
|
||||||
version "2.5.1"
|
version "2.5.3"
|
||||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e"
|
||||||
|
|
||||||
core-util-is@1.0.2, core-util-is@~1.0.0:
|
core-util-is@1.0.2, core-util-is@~1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
@ -2376,10 +2366,10 @@ equal-length@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/equal-length/-/equal-length-1.0.1.tgz#21ca112d48ab24b4e1e7ffc0e5339d31fdfc274c"
|
resolved "https://registry.yarnpkg.com/equal-length/-/equal-length-1.0.1.tgz#21ca112d48ab24b4e1e7ffc0e5339d31fdfc274c"
|
||||||
|
|
||||||
errno@^0.1.3, errno@^0.1.4:
|
errno@^0.1.3, errno@^0.1.4:
|
||||||
version "0.1.4"
|
version "0.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d"
|
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.5.tgz#a563781a6052bc2c9ccd89e8cef0eb9506e0c321"
|
||||||
dependencies:
|
dependencies:
|
||||||
prr "~0.0.0"
|
prr "~1.0.1"
|
||||||
|
|
||||||
error-ex@^1.2.0:
|
error-ex@^1.2.0:
|
||||||
version "1.3.1"
|
version "1.3.1"
|
||||||
@ -2674,18 +2664,6 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
|
|||||||
version "4.2.0"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
|
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
|
||||||
|
|
||||||
estree-walker@^0.2.1:
|
|
||||||
version "0.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
|
|
||||||
|
|
||||||
estree-walker@^0.3.0:
|
|
||||||
version "0.3.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa"
|
|
||||||
|
|
||||||
estree-walker@^0.5.0:
|
|
||||||
version "0.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.1.tgz#64fc375053abc6f57d73e9bd2f004644ad3c5854"
|
|
||||||
|
|
||||||
esutils@^2.0.2:
|
esutils@^2.0.2:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
||||||
@ -3159,8 +3137,8 @@ globals@^10.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7"
|
resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7"
|
||||||
|
|
||||||
globals@^11.0.1:
|
globals@^11.0.1:
|
||||||
version "11.0.1"
|
version "11.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/globals/-/globals-11.0.1.tgz#12a87bb010e5154396acc535e1e43fc753b0e5e8"
|
resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4"
|
||||||
|
|
||||||
globals@^9.18.0:
|
globals@^9.18.0:
|
||||||
version "9.18.0"
|
version "9.18.0"
|
||||||
@ -3719,10 +3697,6 @@ is-installed-globally@^0.1.0:
|
|||||||
global-dirs "^0.1.0"
|
global-dirs "^0.1.0"
|
||||||
is-path-inside "^1.0.0"
|
is-path-inside "^1.0.0"
|
||||||
|
|
||||||
is-module@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
|
|
||||||
|
|
||||||
is-npm@^1.0.0:
|
is-npm@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
|
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
|
||||||
@ -4244,12 +4218,6 @@ macaddress@^0.2.8:
|
|||||||
version "0.2.8"
|
version "0.2.8"
|
||||||
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
|
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
|
||||||
|
|
||||||
magic-string@^0.22.4:
|
|
||||||
version "0.22.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.4.tgz#31039b4e40366395618c1d6cf8193c53917475ff"
|
|
||||||
dependencies:
|
|
||||||
vlq "^0.2.1"
|
|
||||||
|
|
||||||
make-dir@^1.0.0:
|
make-dir@^1.0.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.1.0.tgz#19b4369fe48c116f53c2af95ad102c0e39e85d51"
|
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.1.0.tgz#19b4369fe48c116f53c2af95ad102c0e39e85d51"
|
||||||
@ -5577,8 +5545,8 @@ preserve@^0.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||||
|
|
||||||
prettier@^1.7.0:
|
prettier@^1.7.0:
|
||||||
version "1.9.1"
|
version "1.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.1.tgz#41638a0d47c1efbd1b7d5a742aaa5548eab86d70"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827"
|
||||||
|
|
||||||
pretty-error@^2.0.2, pretty-error@^2.1.1:
|
pretty-error@^2.0.2, pretty-error@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
@ -5657,9 +5625,9 @@ proxy-from-env@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
|
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
|
||||||
|
|
||||||
prr@~0.0.0:
|
prr@~1.0.1:
|
||||||
version "0.0.0"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
|
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
|
||||||
|
|
||||||
pseudomap@^1.0.2:
|
pseudomap@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
@ -6065,10 +6033,6 @@ require-precompiled@^0.1.0:
|
|||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/require-precompiled/-/require-precompiled-0.1.0.tgz#5a1b52eb70ebed43eb982e974c85ab59571e56fa"
|
resolved "https://registry.yarnpkg.com/require-precompiled/-/require-precompiled-0.1.0.tgz#5a1b52eb70ebed43eb982e974c85ab59571e56fa"
|
||||||
|
|
||||||
require-relative@0.8.7:
|
|
||||||
version "0.8.7"
|
|
||||||
resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de"
|
|
||||||
|
|
||||||
require-uncached@^1.0.3:
|
require-uncached@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
|
resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
|
||||||
@ -6094,11 +6058,7 @@ resolve-from@^3.0.0:
|
|||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
|
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
|
||||||
|
|
||||||
resolve@1.1.7:
|
resolve@^1.1.7, resolve@^1.2.0, resolve@^1.3.3, resolve@^1.4.0:
|
||||||
version "1.1.7"
|
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
|
|
||||||
|
|
||||||
resolve@^1.1.6, resolve@^1.1.7, resolve@^1.2.0, resolve@^1.3.3, resolve@^1.4.0:
|
|
||||||
version "1.5.0"
|
version "1.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -6125,7 +6085,7 @@ right-align@^0.1.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
align-text "^0.1.1"
|
align-text "^0.1.1"
|
||||||
|
|
||||||
rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
|
rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1:
|
||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -6138,71 +6098,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
|
|||||||
hash-base "^2.0.0"
|
hash-base "^2.0.0"
|
||||||
inherits "^2.0.1"
|
inherits "^2.0.1"
|
||||||
|
|
||||||
rollup-plugin-alias@^1.4.0:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-plugin-alias/-/rollup-plugin-alias-1.4.0.tgz#120cba7c46621c03138f0ca6fd5dd2ade9872db9"
|
|
||||||
dependencies:
|
|
||||||
slash "^1.0.0"
|
|
||||||
|
|
||||||
rollup-plugin-babel@^3.0.2:
|
|
||||||
version "3.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-3.0.2.tgz#a2765dea0eaa8aece351c983573300d17497495b"
|
|
||||||
dependencies:
|
|
||||||
rollup-pluginutils "^1.5.0"
|
|
||||||
|
|
||||||
rollup-plugin-commonjs@^8.2.6:
|
|
||||||
version "8.2.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.2.6.tgz#27e5b9069ff94005bb01e01bb46a1e4873784677"
|
|
||||||
dependencies:
|
|
||||||
acorn "^5.2.1"
|
|
||||||
estree-walker "^0.5.0"
|
|
||||||
magic-string "^0.22.4"
|
|
||||||
resolve "^1.4.0"
|
|
||||||
rollup-pluginutils "^2.0.1"
|
|
||||||
|
|
||||||
rollup-plugin-node-resolve@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.0.tgz#8b897c4c3030d5001277b0514b25d2ca09683ee0"
|
|
||||||
dependencies:
|
|
||||||
browser-resolve "^1.11.0"
|
|
||||||
builtin-modules "^1.1.0"
|
|
||||||
is-module "^1.0.0"
|
|
||||||
resolve "^1.1.6"
|
|
||||||
|
|
||||||
rollup-plugin-replace@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.0.0.tgz#19074089c8ed57184b8cc64e967a03d095119277"
|
|
||||||
dependencies:
|
|
||||||
magic-string "^0.22.4"
|
|
||||||
minimatch "^3.0.2"
|
|
||||||
rollup-pluginutils "^2.0.1"
|
|
||||||
|
|
||||||
rollup-pluginutils@^1.5.0:
|
|
||||||
version "1.5.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
|
|
||||||
dependencies:
|
|
||||||
estree-walker "^0.2.1"
|
|
||||||
minimatch "^3.0.2"
|
|
||||||
|
|
||||||
rollup-pluginutils@^2.0.1:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.0.1.tgz#7ec95b3573f6543a46a6461bd9a7c544525d0fc0"
|
|
||||||
dependencies:
|
|
||||||
estree-walker "^0.3.0"
|
|
||||||
micromatch "^2.3.11"
|
|
||||||
|
|
||||||
rollup-watch@^4.3.1:
|
|
||||||
version "4.3.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup-watch/-/rollup-watch-4.3.1.tgz#5aa1eaeab787addf368905d102b39d6fc5ce4a8b"
|
|
||||||
dependencies:
|
|
||||||
chokidar "^1.7.0"
|
|
||||||
require-relative "0.8.7"
|
|
||||||
rollup-pluginutils "^2.0.1"
|
|
||||||
|
|
||||||
rollup@^0.52.1:
|
|
||||||
version "0.52.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.52.1.tgz#610e8e1be432f18fcfbfa865408a1cd7618cd707"
|
|
||||||
|
|
||||||
run-async@^2.2.0:
|
run-async@^2.2.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
|
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
|
||||||
@ -6627,8 +6522,8 @@ supports-color@^4.0.0, supports-color@^4.2.1, supports-color@^4.4.0:
|
|||||||
has-flag "^2.0.0"
|
has-flag "^2.0.0"
|
||||||
|
|
||||||
supports-color@^5.0.0:
|
supports-color@^5.0.0:
|
||||||
version "5.0.1"
|
version "5.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.0.1.tgz#1c5331f22250c84202805b2f17adf16699f3a39a"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.1.0.tgz#058a021d1b619f7ddf3980d712ea3590ce7de3d5"
|
||||||
dependencies:
|
dependencies:
|
||||||
has-flag "^2.0.0"
|
has-flag "^2.0.0"
|
||||||
|
|
||||||
@ -6840,15 +6735,15 @@ ua-parser-js@^0.7.9:
|
|||||||
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"
|
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"
|
||||||
|
|
||||||
uglify-es@^3.2.0:
|
uglify-es@^3.2.0:
|
||||||
version "3.2.1"
|
version "3.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.2.1.tgz#93de0aad8a1bb629c8a316f686351bc4d6ece687"
|
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.2.2.tgz#15c62b7775002c81b7987a1c49ecd3f126cace73"
|
||||||
dependencies:
|
dependencies:
|
||||||
commander "~2.12.1"
|
commander "~2.12.1"
|
||||||
source-map "~0.6.1"
|
source-map "~0.6.1"
|
||||||
|
|
||||||
uglify-js@3.2.x:
|
uglify-js@3.2.x, uglify-js@^3.2.2:
|
||||||
version "3.2.1"
|
version "3.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.1.tgz#d6427fd45a25fefc5d196689c0c772a6915e10fe"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.2.tgz#870e4b34ed733d179284f9998efd3293f7fd73f6"
|
||||||
dependencies:
|
dependencies:
|
||||||
commander "~2.12.1"
|
commander "~2.12.1"
|
||||||
source-map "~0.6.1"
|
source-map "~0.6.1"
|
||||||
@ -6862,13 +6757,6 @@ uglify-js@^2.6, uglify-js@^2.8.29:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
uglify-to-browserify "~1.0.0"
|
uglify-to-browserify "~1.0.0"
|
||||||
|
|
||||||
uglify-js@^3.2.2:
|
|
||||||
version "3.2.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.2.tgz#870e4b34ed733d179284f9998efd3293f7fd73f6"
|
|
||||||
dependencies:
|
|
||||||
commander "~2.12.1"
|
|
||||||
source-map "~0.6.1"
|
|
||||||
|
|
||||||
uglify-to-browserify@~1.0.0:
|
uglify-to-browserify@~1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
|
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
|
||||||
@ -7060,10 +6948,6 @@ viewport-dimensions@^0.2.0:
|
|||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz#de740747db5387fd1725f5175e91bac76afdf36c"
|
resolved "https://registry.yarnpkg.com/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz#de740747db5387fd1725f5175e91bac76afdf36c"
|
||||||
|
|
||||||
vlq@^0.2.1:
|
|
||||||
version "0.2.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
|
|
||||||
|
|
||||||
vm-browserify@0.0.4:
|
vm-browserify@0.0.4:
|
||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
|
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
|
||||||
|
Loading…
Reference in New Issue
Block a user