Skip to content

Commit

Permalink
refactor: make build suffix dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo committed Aug 31, 2018
1 parent 510c9e2 commit 76d6ab4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions build/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 76d6ab4

Please sign in to comment.