perf: remove rollup build

Using native node 8.x for less transpilations
This commit is contained in:
Pooya Parsa 2017-12-12 13:12:29 +03:30
parent ceef1f896f
commit 9b8cbed512
50 changed files with 223 additions and 491 deletions

View File

@ -23,12 +23,6 @@ jobs:
paths:
- "node_modules"
# Build
- run:
name: Build
command: |
yarn build
# Test
- run:
name: Tests

View File

@ -8,7 +8,6 @@ cache:
- node_modules
install:
- yarn install
- yarn run build
script:
- yarn run test
after_success:

View File

@ -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]))
}

View File

@ -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')

View File

@ -1,30 +1,30 @@
import { promisify } from 'util'
import _ from 'lodash'
import chokidar from 'chokidar'
import fs, { remove, readFile, writeFile, mkdirp, existsSync } from 'fs-extra'
import hash from 'hash-sum'
import webpack from 'webpack'
import serialize from 'serialize-javascript'
import { join, resolve, basename, extname, dirname } from 'path'
import MFS from 'memory-fs'
import webpackDevMiddleware from 'webpack-dev-middleware'
import webpackHotMiddleware from 'webpack-hot-middleware'
import { r, wp, wChunk, createRoutes, sequence, relativeTo, isPureObject, waitFor, rmCache } from 'utils'
import Debug from 'debug'
import Glob from 'glob'
import clientWebpackConfig from './webpack/client.config.js'
import serverWebpackConfig from './webpack/server.config.js'
import dllWebpackConfig from './webpack/dll.config.js'
import vueLoaderConfig from './webpack/vue-loader.config'
import styleLoader from './webpack/style-loader'
import { Options } from 'common'
const { promisify } = require('util')
const _ = require('lodash')
const chokidar = require('chokidar')
const { remove, readFile, writeFile, mkdirp, existsSync } = require('fs-extra')
const hash = require('hash-sum')
const webpack = require('webpack')
const serialize = require('serialize-javascript')
const { join, resolve, basename, extname, dirname } = require('path')
const MFS = require('memory-fs')
const webpackDevMiddleware = require('webpack-dev-middleware')
const webpackHotMiddleware = require('webpack-hot-middleware')
const { r, wp, wChunk, createRoutes, sequence, relativeTo, isPureObject, waitFor, rmCache } = require('../common/utils')
const Debug = require('debug')
const Glob = require('glob')
const clientWebpackConfig = require('./webpack/client.config.js')
const serverWebpackConfig = require('./webpack/server.config.js')
const dllWebpackConfig = require('./webpack/dll.config.js')
const vueLoaderConfig = require('./webpack/vue-loader.config')
const styleLoader = require('./webpack/style-loader')
const { Options } = require('../common')
const debug = Debug('nuxt:build')
debug.color = 2 // Force green color
const glob = promisify(Glob)
export default class Builder {
module.exports = class Builder {
constructor(nuxt) {
this.nuxt = nuxt
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
this._nuxtPages = typeof this.options.build.createRoutes !== 'function'
if (this._nuxtPages) {
if (!fs.existsSync(join(this.options.srcDir, 'pages'))) {
if (!existsSync(join(this.options.srcDir, 'pages'))) {
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?`)
} else {
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,
env: this.options.env,
head: this.options.head,
middleware: fs.existsSync(join(this.options.srcDir, 'middleware')),
middleware: existsSync(join(this.options.srcDir, 'middleware')),
store: this.options.store,
css: this.options.css,
plugins: this.plugins,
@ -262,7 +262,7 @@ export default class Builder {
}
// -- 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 })
let hasErrorLayout = false
layoutsFiles.forEach((file) => {
@ -326,7 +326,7 @@ export default class Builder {
}
// Allow override templates using a file with same name in ${srcDir}/app
const customPath = r(this.options.srcDir, 'app', file)
const customFileExists = fs.existsSync(customPath)
const customFileExists = existsSync(customPath)
return {
src: customFileExists
@ -463,7 +463,7 @@ export default class Builder {
compiler.plugin('done', async (stats) => {
await this.nuxt.callHook('build:compiled', { name, compiler, stats })
// Reload renderer if available
this.nuxt.renderer.loadResources(sharedFS || fs)
this.nuxt.renderer.loadResources(sharedFS || require('fs'))
// Resolve on next tick
process.nextTick(resolve)
})

View File

@ -1,10 +1,10 @@
import { copy, remove, writeFile, mkdirp, removeSync, existsSync } from 'fs-extra'
import _ from 'lodash'
import { resolve, join, dirname, sep } from 'path'
import { minify } from 'html-minifier'
import { isUrl, promisifyRoute, waitFor, flatRoutes } from 'utils'
const { copy, remove, writeFile, mkdirp, removeSync, existsSync } = require('fs-extra')
const _ = require('lodash')
const { resolve, join, dirname, sep } = require('path')
const { minify } = require('html-minifier')
const { isUrl, promisifyRoute, waitFor, flatRoutes } = require('../common/utils')
export default class Generator {
module.exports = class Generator {
constructor(nuxt, builder) {
this.nuxt = nuxt
this.options = nuxt.options

View File

@ -1,7 +1,7 @@
import Builder from './builder'
import Generator from './generator'
const Builder = require('./builder')
const Generator = require('./generator')
export {
module.exports = {
Builder,
Generator
}

View File

@ -1,10 +1,10 @@
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import { cloneDeep } from 'lodash'
import { join, resolve } from 'path'
import webpack from 'webpack'
import { isUrl, urlJoin } from 'utils'
import TimeFixPlugin from './plugins/timefix'
import WarnFixPlugin from './plugins/warnfix'
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const { cloneDeep } = require('lodash')
const { join, resolve } = require('path')
const webpack = require('webpack')
const { isUrl, urlJoin } = require('../../common/utils')
const TimeFixPlugin = require('./plugins/timefix')
const WarnFixPlugin = require('./plugins/warnfix')
/*
|--------------------------------------------------------------------------
@ -14,8 +14,8 @@ import WarnFixPlugin from './plugins/warnfix'
| webpack config files
|--------------------------------------------------------------------------
*/
export default function webpackBaseConfig({ name, isServer }) {
const nodeModulesDir = join(__dirname, '..', 'node_modules')
module.exports = function webpackBaseConfig({ name, isServer }) {
const nodeModulesDir = join(this.options.nuxtDir, 'node_modules')
const config = {
name,

View File

@ -1,15 +1,15 @@
import { each } from 'lodash'
import webpack from 'webpack'
import VueSSRClientPlugin from 'vue-server-renderer/client-plugin'
import HTMLPlugin from 'html-webpack-plugin'
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'
import UglifyJSPlugin from 'uglifyjs-webpack-plugin'
import ProgressBarPlugin from 'progress-bar-webpack-plugin'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
import { resolve } from 'path'
import { existsSync } from 'fs'
import Debug from 'debug'
import base from './base.config.js'
const { each } = require('lodash')
const webpack = require('webpack')
const VueSSRClientPlugin = require('vue-server-renderer/client-plugin')
const HTMLPlugin = require('html-webpack-plugin')
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const ProgressBarPlugin = require('progress-bar-webpack-plugin')
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const { resolve } = require('path')
const { existsSync } = require('fs')
const Debug = require('debug')
const base = require('./base.config.js')
const debug = Debug('nuxt:build')
debug.color = 2 // Force green color
@ -24,7 +24,7 @@ debug.color = 2 // Force green color
| 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 })
// Entry points

View File

@ -1,6 +1,6 @@
import webpack from 'webpack'
import { resolve } from 'path'
import ClientConfig from './client.config'
const webpack = require('webpack')
const { resolve } = require('path')
const ClientConfig = require('./client.config')
/*
|--------------------------------------------------------------------------
@ -8,7 +8,7 @@ import ClientConfig from './client.config'
| 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 name = refConfig.name + '-dll'

View File

@ -1,6 +1,6 @@
// Taken from https://github.com/egoist/poi/blob/3e93c88c520db2d20c25647415e6ae0d3de61145/packages/poi/lib/webpack/timefix-plugin.js#L1-L16
// Thanks to @egoist
export default class TimeFixPlugin {
module.exports = class TimeFixPlugin {
constructor(timefix = 11000) {
this.timefix = timefix
}

View File

@ -1,4 +1,4 @@
export default class WarnFixPlugin {
module.exports = class WarnFixPlugin {
apply(compiler) /* istanbul ignore next */ {
compiler.plugin('done', stats => {
stats.compilation.warnings = stats.compilation.warnings.filter(warn => {

View File

@ -1,17 +1,17 @@
import webpack from 'webpack'
import VueSSRServerPlugin from 'vue-server-renderer/server-plugin'
import nodeExternals from 'webpack-node-externals'
import { each } from 'lodash'
import { resolve } from 'path'
import { existsSync } from 'fs'
import base from './base.config.js'
const webpack = require('webpack')
const VueSSRServerPlugin = require('vue-server-renderer/server-plugin')
const nodeExternals = require('webpack-node-externals')
const { each } = require('lodash')
const { resolve } = require('path')
const { existsSync } = require('fs')
const base = require('./base.config.js')
/*
|--------------------------------------------------------------------------
| Webpack Server Config
|--------------------------------------------------------------------------
*/
export default function webpackServerConfig() {
module.exports = function webpackServerConfig() {
let config = base.call(this, { name: 'server', isServer: true })
// env object defined in nuxt.config.js

View File

@ -1,7 +1,7 @@
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import { join } from 'path'
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const { join } = require('path')
export default function styleLoader(ext, loaders = [], isVueLoader = false) {
module.exports = function styleLoader(ext, loaders = [], isVueLoader = false) {
// Normalize loaders
loaders = (Array.isArray(loaders) ? loaders : [loaders]).map(loader => {
if (typeof loader === 'string') {

View File

@ -1,4 +1,4 @@
export default function vueLoader({ isServer }) {
module.exports = function vueLoader({ isServer }) {
// https://vue-loader.vuejs.org/en
const config = {
postcss: this.options.build.postcss,

View File

@ -8,10 +8,9 @@ pe.skipPackage('regenerator-runtime')
pe.skipPackage('babel-runtime')
pe.skipPackage('core-js')
// Skip dist artifacts and Node internals
const skipFiles = [ 'nuxt.js', 'core.js' ]
// Skip node internals
pe.skip((traceLine, lineNumber) => {
if (!traceLine.file || skipFiles.indexOf(traceLine.file) !== -1) {
if (!traceLine.file) {
return true
}
})

View File

@ -1,12 +1,7 @@
import * as Utils from './utils'
import Options from './options'
const Utils = require('./utils')
const Options = require('./options')
export default {
Utils,
Options
}
export {
module.exports = {
Utils,
Options
}

View File

@ -1,15 +1,15 @@
import _ from 'lodash'
import Debug from 'debug'
import { join, resolve } from 'path'
import { existsSync } from 'fs'
import { isUrl, isPureObject } from 'utils'
const _ = require('lodash')
const Debug = require('debug')
const { join, resolve } = require('path')
const { existsSync } = require('fs')
const { isUrl, isPureObject } = require('../common/utils')
const debug = Debug('nuxt:build')
debug.color = 2 // Force green color
const Options = {}
export default Options
module.exports = Options
Options.from = function (_options) {
// Clone options to prevent unwanted side-effects
@ -203,8 +203,8 @@ Options.defaults = {
debug: undefined, // Will be equal to dev if not provided
buildDir: '.nuxt',
cacheDir: '.cache',
nuxtDir: resolve(__dirname, '..'), // Relative to dist
nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
nuxtDir: resolve(__dirname, '../..'),
nuxtAppDir: resolve(__dirname, '../app'),
build: {
analyze: false,
dll: false,

View File

@ -1,15 +1,15 @@
import { resolve, relative, sep } from 'path'
import _ from 'lodash'
const { resolve, relative, sep } = require('path')
const _ = require('lodash')
export function encodeHtml(str) {
exports.encodeHtml = function encodeHtml(str) {
return str.replace(/</g, '&lt;').replace(/>/g, '&gt;')
}
export function getContext(req, res) {
exports.getContext = function getContext(req, res) {
return { req, res }
}
export function setAnsiColors(ansiHTML) {
exports.setAnsiColors = function setAnsiColors(ansiHTML) {
ansiHTML.setColors({
reset: ['efefef', 'a6004c'],
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)))
}
export function urlJoin() {
exports.urlJoin = function urlJoin() {
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)
}
export function promisifyRoute(fn, ...args) {
exports.promisifyRoute = function promisifyRoute(fn, ...args) {
// If routes is an array
if (Array.isArray(fn)) {
return Promise.resolve(fn)
@ -57,15 +57,15 @@ export function promisifyRoute(fn, ...args) {
return promise
}
export function sequence(tasks, fn) {
exports.sequence = function sequence(tasks, fn) {
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)))
}
export function chainFn(base, fn) {
exports.chainFn = function chainFn(base, fn) {
/* istanbul ignore if */
if (!(fn instanceof Function)) {
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'
}
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 */
if (isWindows) {
return p.replace(/\\/g, '\\\\')
@ -102,7 +102,7 @@ export function wp(p = '') {
return p
}
export function wChunk(p = '') {
exports.wChunk = function wChunk(p = '') {
/* istanbul ignore if */
if (isWindows) {
return p.replace(/\//g, '_')
@ -114,7 +114,7 @@ const reqSep = /\//g
const sysSep = _.escapeRegExp(sep)
const normalize = string => string.replace(reqSep, sysSep)
export function r() {
const r = exports.r = function r() {
let args = Array.prototype.slice.apply(arguments)
let lastArg = _.last(args)
@ -125,7 +125,7 @@ export function r() {
return wp(resolve(...args.map(normalize)))
}
export function relativeTo() {
exports.relativeTo = function relativeTo() {
let args = Array.prototype.slice.apply(arguments)
let dir = args.shift()
@ -145,7 +145,7 @@ export function relativeTo() {
return wp(rp)
}
export function flatRoutes(router, path = '', routes = []) {
exports.flatRoutes = function flatRoutes(router, path = '', routes = []) {
router.forEach((r) => {
if (!r.path.includes(':') && !r.path.includes('*')) {
/* istanbul ignore if */
@ -163,7 +163,7 @@ export function flatRoutes(router, path = '', routes = []) {
return routes
}
export function cleanChildrenRoutes(routes, isChild = false) {
function cleanChildrenRoutes(routes, isChild = false) {
let start = -1
let routesIndex = []
routes.forEach((route) => {
@ -209,7 +209,7 @@ export function cleanChildrenRoutes(routes, isChild = false) {
return routes
}
export function createRoutes(files, srcDir) {
exports.createRoutes = function createRoutes(files, srcDir) {
let routes = []
files.forEach((file) => {
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)
}
export function rmCache(path) {
exports.rmCache = function rmCache(path) {
const mod = require.cache[path]
delete require.cache[path]
if (mod.parent && mod.parent.children) {

View File

@ -1,9 +1,9 @@
import { Options, Utils } from 'common'
import Module from './module'
import Nuxt from './nuxt'
import Renderer from './renderer'
const { Options, Utils } = require('../common')
const Module = require('./module')
const Nuxt = require('./nuxt')
const Renderer = require('./renderer')
export {
module.exports = {
Nuxt,
Module,
Renderer,

View File

@ -1,10 +1,10 @@
import Vue from 'vue'
import VueMeta from 'vue-meta'
import VueServerRenderer from 'vue-server-renderer'
import LRU from 'lru-cache'
const Vue = require('vue')
const VueMeta = require('vue-meta')
const VueServerRenderer = require('vue-server-renderer')
const LRU = require('lru-cache')
export default class MetaRenderer {
module.exports = class MetaRenderer {
constructor(nuxt, renderer) {
this.nuxt = nuxt
this.renderer = renderer

View File

@ -1,13 +1,13 @@
import path from 'path'
import fs from 'fs'
import { uniq } from 'lodash'
import hash from 'hash-sum'
import { chainFn, sequence } from 'utils'
import Debug from 'debug'
const path = require('path')
const fs = require('fs')
const { uniq } = require('lodash')
const hash = require('hash-sum')
const { chainFn, sequence } = require('../common/utils')
const Debug = require('debug')
const debug = Debug('nuxt:module')
export default class ModuleContainer {
module.exports = class ModuleContainer {
constructor(nuxt) {
this.nuxt = nuxt
this.options = nuxt.options

View File

@ -1,18 +1,19 @@
import chalk from 'chalk'
import { Options } from 'common'
import { sequence } from 'utils'
import ModuleContainer from './module'
import Renderer from './renderer'
import Debug from 'debug'
import enableDestroy from 'server-destroy'
import Module from 'module'
import { isPlainObject } from 'lodash'
import { join, resolve } from 'path'
const Debug = require('debug')
const enableDestroy = require('server-destroy')
const Module = require('module')
const { isPlainObject } = require('lodash')
const chalk = require('chalk')
const { Options } = require('../common')
const { sequence } = require('../common/utils')
const { join, resolve } = require('path')
const { version } = require('../../package.json')
const ModuleContainer = require('./module')
const Renderer = require('./renderer')
const debug = Debug('nuxt:')
debug.color = 5
export default class Nuxt {
module.exports = class Nuxt {
constructor(options = {}) {
this.options = Options.from(options)
@ -45,7 +46,7 @@ export default class Nuxt {
}
static get version() {
return '__VERSION__'
return version
}
async ready() {

View File

@ -1,20 +1,20 @@
import ansiHTML from 'ansi-html'
import serialize from 'serialize-javascript'
import generateETag from 'etag'
import fresh from 'fresh'
import serveStatic from 'serve-static'
import compression from 'compression'
import _ from 'lodash'
import { join, resolve } from 'path'
import fs from 'fs-extra'
import { createBundleRenderer } from 'vue-server-renderer'
import { getContext, setAnsiColors, isUrl, waitFor } from 'utils'
import Debug from 'debug'
import Youch from '@nuxtjs/youch'
import { SourceMapConsumer } from 'source-map'
import connect from 'connect'
import { Options } from 'common'
import MetaRenderer from './meta'
const ansiHTML = require('ansi-html')
const serialize = require('serialize-javascript')
const generateETag = require('etag')
const fresh = require('fresh')
const serveStatic = require('serve-static')
const compression = require('compression')
const _ = require('lodash')
const { join, resolve } = require('path')
const fs = require('fs-extra')
const { createBundleRenderer } = require('vue-server-renderer')
const { getContext, setAnsiColors, isUrl, waitFor } = require('../common/utils')
const Debug = require('debug')
const Youch = require('@nuxtjs/youch')
const { SourceMapConsumer } = require('source-map')
const connect = require('connect')
const { Options } = require('../common')
const MetaRenderer = require('./meta')
const debug = Debug('nuxt:render')
debug.color = 4 // Force blue color
@ -23,7 +23,7 @@ setAnsiColors(ansiHTML)
let jsdom = null
export default class Renderer {
module.exports = class Renderer {
constructor(nuxt) {
this.nuxt = nuxt
this.options = nuxt.options

View File

@ -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)

View File

@ -13,7 +13,7 @@
"name": "Pooya Parsa (@pi0)"
}
],
"main": "./index.js",
"main": "./lib/index.js",
"license": "MIT",
"repository": {
"type": "git",
@ -21,7 +21,6 @@
},
"files": [
"bin",
"dist",
"lib",
"index.js"
],
@ -47,14 +46,9 @@
]
},
"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",
"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",
"postinstall": "opencollective postinstall || exit 0",
"release-next": "npm run build && node ./build/release-next && npm publish --tag next"
@ -106,7 +100,6 @@
"serve-static": "^1.13.1",
"server-destroy": "^1.0.1",
"source-map": "^0.6.1",
"source-map-support": "^0.5.0",
"style-resources-loader": "^1.0.0",
"uglifyjs-webpack-plugin": "^1.1.2",
"url-loader": "^0.6.2",
@ -149,14 +142,6 @@
"puppeteer": "^0.13.0",
"request": "^2.83.0",
"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",
"uglify-js": "^3.2.2"
},

View File

@ -1,6 +1,6 @@
import test from 'ava'
import { resolve } from 'path'
import { Nuxt, Options } from '../index'
import { Nuxt, Options } from '..'
import { version } from '../package.json'
test('Nuxt.version is same as package', t => {

View File

@ -1,6 +1,6 @@
import test from 'ava'
import { resolve } from 'path'
import { Nuxt, Builder } from '../index'
import { Nuxt, Builder } from '..'
import * as browser from './helpers/browser'
const port = 4003

View File

@ -2,7 +2,7 @@ import test from 'ava'
import { resolve } from 'path'
import stdMocks from 'std-mocks'
// import rp from 'request-promise-native'
import { Nuxt, Builder, Utils } from '../index.js'
import { Nuxt, Builder, Utils } from '..'
import { truncateSync, readFileSync, writeFileSync } from 'fs'
const port = 4001

View File

@ -1,6 +1,6 @@
import test from 'ava'
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 => {
const options = {

View File

@ -5,7 +5,7 @@ import http from 'http'
import serveStatic from 'serve-static'
import finalhandler from 'finalhandler'
import rp from 'request-promise-native'
import { Nuxt, Builder, Generator } from '../index.js'
import { Nuxt, Builder, Generator } from '..'
const port = 4002
const url = (route) => 'http://localhost:' + port + route

View File

@ -5,7 +5,7 @@ import http from 'http'
import serveStatic from 'serve-static'
import finalhandler from 'finalhandler'
import rp from 'request-promise-native'
import { Nuxt, Builder, Generator } from '../index.js'
import { Nuxt, Builder, Generator } from '..'
const port = 4002
const url = (route) => 'http://localhost:' + port + route

View File

@ -2,7 +2,7 @@ import test from 'ava'
import { resolve } from 'path'
import rp from 'request-promise-native'
import stdMocks from 'std-mocks'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const port = 4003
const url = (route) => 'http://localhost:' + port + route

View File

@ -1,6 +1,6 @@
import test from 'ava'
import { resolve } from 'path'
import { Nuxt, Builder, Utils } from '../index.js'
import { Nuxt, Builder, Utils } from '..'
import * as browser from './helpers/browser'
const port = 4005

View File

@ -1,6 +1,6 @@
import test from 'ava'
import { resolve } from 'path'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const port = 4004
// const url = (route) => 'http://localhost:' + port + route

View File

@ -2,10 +2,10 @@ import { promisify } from 'util'
import test from 'ava'
import { resolve, sep } from 'path'
import rp from 'request-promise-native'
import { Utils } from '../index.js'
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 port = 4011
@ -14,7 +14,7 @@ const url = (route) => 'http://localhost:' + port + route
test('bin/nuxt-build', async t => {
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(stderr.includes('Building done'))
@ -82,7 +82,7 @@ test('bin/nuxt-start', async t => {
test('bin/nuxt-generate', async t => {
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(stderr.includes('Destination folder cleaned'))

View File

@ -1,7 +1,7 @@
import test from 'ava'
import { resolve } from 'path'
import rp from 'request-promise-native'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const port = 4009
const url = (route) => 'http://localhost:' + port + route

View File

@ -2,7 +2,7 @@ import test from 'ava'
import stdMocks from 'std-mocks'
import { resolve } from 'path'
import rp from 'request-promise-native'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const port = 4010
const url = (route) => 'http://localhost:' + port + route

View File

@ -3,7 +3,7 @@ import test from 'ava'
import { resolve } from 'path'
import fs from 'fs'
import stdMocks from 'std-mocks'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const readFile = promisify(fs.readFile)
const rootDir = resolve(__dirname, './fixtures/dll')

View File

@ -1,7 +1,7 @@
import test from 'ava'
import { resolve } from 'path'
import fs from 'fs'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
import { promisify } from 'util'
const readFile = promisify(fs.readFile)

View File

@ -1,7 +1,7 @@
import test from 'ava'
import { resolve } from 'path'
import rp from 'request-promise-native'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const port = 4005
const url = (route) => 'http://localhost:' + port + route

View File

@ -1,6 +1,6 @@
import test from 'ava'
import { resolve } from 'path'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
import express from 'express'
import rp from 'request-promise-native'

View File

@ -1,5 +1,3 @@
const path = require('path')
module.exports = {
generate: {
routes: [
@ -10,7 +8,6 @@ module.exports = {
interval: 200,
subFolders: true
},
modulesDir: path.join(__dirname, '..', '..', '..', 'node_modules'),
hooks: {
ready(nuxt) {
nuxt.__hook_called__ = true

View File

@ -1,5 +1,5 @@
import test from 'ava'
import { Nuxt, Generator } from '../index.js'
import { Nuxt, Generator } from '..'
test('initRoutes with routes (fn => array)', async t => {
const array = ['/1', '/2', '/3', '/4']

View File

@ -1,6 +1,6 @@
import test from 'ava'
import { resolve } from 'path'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
test('Nuxt.js Class', t => {
t.is(typeof Nuxt, 'function')

View File

@ -2,7 +2,7 @@ import test from 'ava'
import stdMocks from 'std-mocks'
import { resolve, normalize } from 'path'
import rp from 'request-promise-native'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const port = 4006
const url = (route) => 'http://localhost:' + port + route

View File

@ -1,6 +1,6 @@
import test from 'ava'
import stdMocks from 'std-mocks'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
let nuxt = null

View File

@ -1,6 +1,6 @@
import test from 'ava'
import ansiHTML from 'ansi-html'
import { Utils } from '../index.js'
import { Utils } from '..'
test('encodeHtml', t => {
const html = '<h1>Hello</h1>'

View File

@ -1,7 +1,7 @@
import test from 'ava'
import { resolve } from 'path'
import rp from 'request-promise-native'
import { Nuxt, Builder } from '../index.js'
import { Nuxt, Builder } from '..'
const port = 4007
const url = (route) => 'http://localhost:' + port + route

170
yarn.lock
View File

@ -110,8 +110,8 @@
resolved "https://registry.yarnpkg.com/@std/esm/-/esm-0.16.0.tgz#2a7a33ecb7f1701cebd4c87df6d0d945ed51f730"
"@types/node@*":
version "8.0.57"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.57.tgz#e5d8b4dc112763e35cfc51988f4f38da3c486d99"
version "8.0.58"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90"
abab@^1.0.3:
version "1.0.4"
@ -1222,12 +1222,6 @@ browser-process-hrtime@^0.1.2:
version "0.1.2"
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:
version "1.1.1"
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"
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"
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"
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
version "1.0.30000780"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000780.tgz#8d1977561d00ff0f0ed2b6b66140328ab4504c0a"
version "1.0.30000782"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000782.tgz#d8815bce1578c350aced1132507301205e0fab53"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000780:
version "1.0.30000780"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000780.tgz#1f9095f2efd4940e0ba6c5992ab7a9b64cc35ba4"
caniuse-lite@^1.0.30000782:
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000780, caniuse-lite@^1.0.30000782:
version "1.0.30000782"
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"
core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b"
version "2.5.3"
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:
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"
errno@^0.1.3, errno@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d"
version "0.1.5"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.5.tgz#a563781a6052bc2c9ccd89e8cef0eb9506e0c321"
dependencies:
prr "~0.0.0"
prr "~1.0.1"
error-ex@^1.2.0:
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"
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:
version "2.0.2"
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"
globals@^11.0.1:
version "11.0.1"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.0.1.tgz#12a87bb010e5154396acc535e1e43fc753b0e5e8"
version "11.1.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4"
globals@^9.18.0:
version "9.18.0"
@ -3719,10 +3697,6 @@ is-installed-globally@^0.1.0:
global-dirs "^0.1.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:
version "1.0.0"
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"
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:
version "1.1.0"
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"
prettier@^1.7.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.1.tgz#41638a0d47c1efbd1b7d5a742aaa5548eab86d70"
version "1.9.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827"
pretty-error@^2.0.2, pretty-error@^2.1.1:
version "2.1.1"
@ -5657,9 +5625,9 @@ proxy-from-env@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
prr@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
pseudomap@^1.0.2:
version "1.0.2"
@ -6065,10 +6033,6 @@ require-precompiled@^0.1.0:
version "0.1.0"
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:
version "1.0.3"
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"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
resolve@1.1.7:
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:
resolve@^1.1.7, resolve@^1.2.0, resolve@^1.3.3, resolve@^1.4.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36"
dependencies:
@ -6125,7 +6085,7 @@ right-align@^0.1.1:
dependencies:
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"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
dependencies:
@ -6138,71 +6098,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^2.0.0"
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:
version "2.3.0"
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"
supports-color@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.0.1.tgz#1c5331f22250c84202805b2f17adf16699f3a39a"
version "5.1.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.1.0.tgz#058a021d1b619f7ddf3980d712ea3590ce7de3d5"
dependencies:
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"
uglify-es@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.2.1.tgz#93de0aad8a1bb629c8a316f686351bc4d6ece687"
version "3.2.2"
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.2.2.tgz#15c62b7775002c81b7987a1c49ecd3f126cace73"
dependencies:
commander "~2.12.1"
source-map "~0.6.1"
uglify-js@3.2.x:
version "3.2.1"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.1.tgz#d6427fd45a25fefc5d196689c0c772a6915e10fe"
uglify-js@3.2.x, 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"
@ -6862,13 +6757,6 @@ uglify-js@^2.6, uglify-js@^2.8.29:
optionalDependencies:
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:
version "1.0.2"
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"
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:
version "0.0.4"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"