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