mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
add option to namespace .nuxt
This commit is contained in:
parent
923f907442
commit
8473cd3a6b
@ -110,7 +110,7 @@ export async function build () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
debug(`App root: ${this.srcDir}`)
|
debug(`App root: ${this.srcDir}`)
|
||||||
debug('Generating .nuxt/ files...')
|
debug(`Generating .nuxt/${this.options.build.buildNamespace ? (this.options.build.buildNamespace + '/') : ''} files...`)
|
||||||
// Create .nuxt/, .nuxt/components and .nuxt/dist folders
|
// Create .nuxt/, .nuxt/components and .nuxt/dist folders
|
||||||
await remove(r(this.buildDir))
|
await remove(r(this.buildDir))
|
||||||
await mkdirp(r(this.buildDir, 'components'))
|
await mkdirp(r(this.buildDir, 'components'))
|
||||||
|
@ -62,7 +62,9 @@ class Nuxt {
|
|||||||
webpack: {},
|
webpack: {},
|
||||||
chokidar: {}
|
chokidar: {}
|
||||||
},
|
},
|
||||||
build: {}
|
build: {
|
||||||
|
buildNamespace: null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Sanitization
|
// Sanitization
|
||||||
if (options.loading === true) delete options.loading
|
if (options.loading === true) delete options.loading
|
||||||
@ -77,7 +79,8 @@ class Nuxt {
|
|||||||
// Explicit srcDir, rootDir and buildDir
|
// Explicit srcDir, rootDir and buildDir
|
||||||
this.dir = (typeof options.rootDir === 'string' && options.rootDir ? options.rootDir : process.cwd())
|
this.dir = (typeof options.rootDir === 'string' && options.rootDir ? options.rootDir : process.cwd())
|
||||||
this.srcDir = (typeof options.srcDir === 'string' && options.srcDir ? resolve(this.dir, options.srcDir) : this.dir)
|
this.srcDir = (typeof options.srcDir === 'string' && options.srcDir ? resolve(this.dir, options.srcDir) : this.dir)
|
||||||
this.buildDir = resolve(this.dir, '.nuxt')
|
this.buildDir = (typeof options.build.buildNamespace === 'string' && options.build.buildNamespace)
|
||||||
|
? resolve(this.dir, '.nuxt', options.build.buildNamespace) : resolve(this.dir, '.nuxt')
|
||||||
options.rootDir = this.dir
|
options.rootDir = this.dir
|
||||||
options.srcDir = this.srcDir
|
options.srcDir = this.srcDir
|
||||||
options.buildDir = this.buildDir
|
options.buildDir = this.buildDir
|
||||||
|
Loading…
Reference in New Issue
Block a user