remove NUXT_APP_DIR env

This commit is contained in:
Sébastien Chopin 2017-06-18 15:48:25 +02:00
parent 7be51b410a
commit 582e8179f4
2 changed files with 6 additions and 15 deletions

View File

@ -1,30 +1,21 @@
/*! /*!
* Nuxt.js * Nuxt.js
* (c) 2016-2017 Chopin Brothers * (c) 2016-2017 Chopin Brothers
* Core maintainer: Pooya (@pi0)
* Released under the MIT License. * Released under the MIT License.
*/ */
const path = require('path')
process.noDeprecation = true
// Node Source Map Support // Node Source Map Support
// https://github.com/evanw/node-source-map-support // https://github.com/evanw/node-source-map-support
require('source-map-support').install(); require('source-map-support').install();
// Fix babel flag
process.noDeprecation = true
// Require Core // Require Core
const Core = require('./dist/core.js') const Core = require('./dist/core.js')
// Object.assign(exports, Core.default || Core)
// Require Builder // Require Builder
const Builder = require('./dist/builder') const Builder = require('./dist/builder')
// Object.assign(exports, Builder.default || Builder)
// FIXME module.exports = Object.assign(Core, Builder)
Object.assign(Core.default || Core, Builder.default || Builder)
module.exports = Core.default || Core
// Use special env flag to specify app dir without modify builder
if (!process.env.NUXT_APP_DIR) {
process.env.NUXT_APP_DIR = path.resolve(__dirname, 'lib/app')
}

View File

@ -57,7 +57,7 @@ const defaultOptions = {
dev: (process.env.NODE_ENV !== 'production'), dev: (process.env.NODE_ENV !== 'production'),
runBuild: false, runBuild: false,
buildDir: '.nuxt', buildDir: '.nuxt',
nuxtAppDir: process.env.NUXT_APP_DIR || resolve(__dirname, '../lib/app'), // Relative to dist nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
build: { build: {
analyze: false, analyze: false,
extractCSS: false, extractCSS: false,