mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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('Generating .nuxt/ files...')
|
||||
debug(`Generating .nuxt/${this.options.build.buildNamespace ? (this.options.build.buildNamespace + '/') : ''} files...`)
|
||||
// Create .nuxt/, .nuxt/components and .nuxt/dist folders
|
||||
await remove(r(this.buildDir))
|
||||
await mkdirp(r(this.buildDir, 'components'))
|
||||
|
@ -62,7 +62,9 @@ class Nuxt {
|
||||
webpack: {},
|
||||
chokidar: {}
|
||||
},
|
||||
build: {}
|
||||
build: {
|
||||
buildNamespace: null
|
||||
}
|
||||
}
|
||||
// Sanitization
|
||||
if (options.loading === true) delete options.loading
|
||||
@ -77,7 +79,8 @@ class Nuxt {
|
||||
// Explicit srcDir, rootDir and buildDir
|
||||
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.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.srcDir = this.srcDir
|
||||
options.buildDir = this.buildDir
|
||||
|
Loading…
Reference in New Issue
Block a user