Skip to content

Commit

Permalink
Merge branch 'release/v0.1.0-alpha.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ClassicOldSong committed Jan 1, 2018
2 parents b57334e + 3909725 commit 7068867
Show file tree
Hide file tree
Showing 8 changed files with 2,354 additions and 1,365 deletions.
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"es6": true
},
"globals": {
"ENV": true
"process": true
},
"extends": "eslint:recommended",
"parserOptions": {
Expand Down Expand Up @@ -165,7 +165,7 @@
"allowForLoopAfterthoughts": true
}
],
"no-process-env": "error",
"no-process-env": "off",
"no-process-exit": "error",
"no-proto": "error",
"no-prototype-builtins": "error",
Expand Down
21 changes: 4 additions & 17 deletions config/rollup.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,15 @@ const {
console.log('Target:', chalk.bold.green(process.env.NODE_ENV || 'development'))
switch (process.env.BUILD_ENV) {
case 'DEMO': {
console.log(chalk.cyan`
+------------+
| DEMO BUILD |
+------------+
`)
console.log(chalk.cyan('+----=+| DEMO BUILD |+=----+'))
break
}
case 'CI': {
console.log(chalk.green`
+----------+
| CI BUILD |
+----------+
`)
console.log(chalk.green('+----=+| CI BUILD |+=----+'))
break
}
default: {
console.log(chalk.yellow`
+--------------+
| NORMAL BUILD |
+--------------+
`)
console.log(chalk.yellow('+----=+| NORMAL BUILD |+=----+'))
}
}

Expand Down Expand Up @@ -105,8 +93,7 @@ export default {
combineStyleTags
}),
replace({
ENV: `'${process.env.NODE_ENV || 'development'}'`,
'// DEMO_BUILD_UNCOMMENT ': process.env.BUILD_ENV === 'DEMO' ? '' : '// '
'process.env.NODE_ENV': `'${process.env.NODE_ENV || 'development'}'`
}),
buble({
transforms: {
Expand Down
8 changes: 8 additions & 0 deletions config/rollup.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const {input, name, plugins, devPath, bundle} = base
// Add browser-sync plugin
plugins.push(browsersync(bsConfig))


const config = {
input,
output: {
Expand All @@ -25,4 +26,11 @@ const config = {
}
}

// Load demo script
if (process.env.BUILD_ENV === 'DEMO') config.input = 'src/demo/loader.js'

delete base.bundle
delete base.devPath
delete base.proPath

export default config
7 changes: 7 additions & 0 deletions config/rollup.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ const config = {
}
}

// Load demo script
if (process.env.BUILD_ENV === 'DEMO') config.input = 'src/demo/loader.js'

delete base.bundle
delete base.devPath
delete base.proPath

export default config
Loading

0 comments on commit 7068867

Please sign in to comment.