From 582e8179f45275f2e7077f7d594b9e85b2ef2aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sun, 18 Jun 2017 15:48:25 +0200 Subject: [PATCH] remove NUXT_APP_DIR env --- index.js | 19 +++++-------------- lib/core/options.js | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/index.js b/index.js index c31a643f6f..a3e2b704ee 100644 --- a/index.js +++ b/index.js @@ -1,30 +1,21 @@ /*! * Nuxt.js * (c) 2016-2017 Chopin Brothers + * Core maintainer: Pooya (@pi0) * Released under the MIT License. */ -const path = require('path') - -process.noDeprecation = true - // Node Source Map Support // https://github.com/evanw/node-source-map-support require('source-map-support').install(); +// Fix babel flag +process.noDeprecation = true + // Require Core const Core = require('./dist/core.js') -// Object.assign(exports, Core.default || Core) // Require Builder const Builder = require('./dist/builder') -// Object.assign(exports, Builder.default || Builder) -// FIXME -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') -} +module.exports = Object.assign(Core, Builder) diff --git a/lib/core/options.js b/lib/core/options.js index ae36a265e6..c4e735968e 100755 --- a/lib/core/options.js +++ b/lib/core/options.js @@ -57,7 +57,7 @@ const defaultOptions = { dev: (process.env.NODE_ENV !== 'production'), runBuild: false, buildDir: '.nuxt', - nuxtAppDir: process.env.NUXT_APP_DIR || resolve(__dirname, '../lib/app'), // Relative to dist + nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist build: { analyze: false, extractCSS: false,