mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
refactor: make build suffix dynamically
This commit is contained in:
parent
510c9e2dc4
commit
76d6ab4190
@ -90,7 +90,7 @@ jobs:
|
||||
command: |
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
EDGE_BUILD=1 yarn build
|
||||
BUILD_SUFFIX=edge yarn build
|
||||
npm publish
|
||||
for p in packages/*; do cd $p ; npm publish ; cd - ; done
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { builtinsMap } from './builtins'
|
||||
|
||||
const DEFAULTS = {
|
||||
distDir: 'dist',
|
||||
edge: Boolean(process.env.EDGE_BUILD)
|
||||
buildSuffix: Boolean(process.env.BUILD_SUFFIX)
|
||||
}
|
||||
|
||||
export default class Package extends EventEmitter {
|
||||
@ -87,8 +87,8 @@ export default class Package extends EventEmitter {
|
||||
build() {
|
||||
this.emit('build:before')
|
||||
|
||||
if (this.edge) {
|
||||
this.convertTo('edge')
|
||||
if (this.buildSuffix) {
|
||||
this.convertTo(this.buildSuffix)
|
||||
}
|
||||
|
||||
this.logger.info('Cleaning up')
|
||||
|
Loading…
Reference in New Issue
Block a user