if srcDir not set, default to this.dir (rootDir)

This commit is contained in:
cj 2016-12-08 00:55:44 -06:00
parent df363e9770
commit 187fec3f32

View File

@ -51,7 +51,7 @@ class Nuxt {
// Env variables
this.dev = this.options.dev
this.dir = (typeof options.rootDir === 'string' && options.rootDir ? options.rootDir : process.cwd())
this.srcDir = (typeof options.srcDir === 'string' && options.srcDir ? options.srcDir : process.cwd())
this.srcDir = (typeof options.srcDir === 'string' && options.srcDir ? options.srcDir : this.dir)
// If store defined, update store options to true
if (fs.existsSync(join(this.srcDir, 'store', 'index.js'))) {
this.options.store = true