Skip to content

Commit

Permalink
Upgrade to ef-core v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ClassicOldSong committed May 7, 2018
1 parent 7068867 commit 109c170
Show file tree
Hide file tree
Showing 8 changed files with 2,765 additions and 2,972 deletions.
17 changes: 3 additions & 14 deletions config/rollup.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import eft from 'rollup-plugin-eft'
import postcss from 'rollup-plugin-postcss'

// Postcss plugins
import postcssModules from 'postcss-modules'
import simplevars from 'postcss-simple-vars'
import nested from 'postcss-nested'
import cssnext from 'postcss-cssnext'
Expand Down Expand Up @@ -52,8 +51,6 @@ switch (process.env.BUILD_ENV) {
}
}

const cssExportMap = {}

export default {
input,
name,
Expand All @@ -76,21 +73,13 @@ export default {
postcss({
plugins: [
simplevars({ variables: colors }),
postcssimport(),
nested(),
cssnext({ warnForDuplicates: false }),
postcssimport(),
postcssModules({
getJSON(id, exportTokens) {
cssExportMap[id] = exportTokens
}
}),
cssnano()
],
getExport(id) {
return cssExportMap[id]
},
extract,
combineStyleTags
modules: true,
combineStyleTags: true
}),
replace({
'process.env.NODE_ENV': `'${process.env.NODE_ENV || 'development'}'`
Expand Down
2 changes: 1 addition & 1 deletion config/rollup.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const config = {
plugins,
watch: {
chokidar: true,
include: 'src/'
include: 'src/**'
}
}

Expand Down
16 changes: 10 additions & 6 deletions config/rollup.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@ const config = {
name,
file: `${proPath}/${bundle}.js`,
format: 'umd',
sourcemap: true
sourcemap: true,
globals: {
'ef-core': 'ef'
}
},
plugins,
external: ['ef-core'],
globals: {
'ef-core': 'efCore'
}
external: ['ef-core']
}

// Load demo script
if (process.env.BUILD_ENV === 'DEMO') config.input = 'src/demo/loader.js'
if (process.env.BUILD_ENV === 'DEMO') {
config.input = 'src/demo/loader.js'
config.external.push('neonclear')
config.output.globals.neonclear = 'neon'
}

delete base.bundle
delete base.devPath
Expand Down
1 change: 1 addition & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<h1>Neonclear</h1>
<p>Javascript is required for this site.</p>
<script src="https://unpkg.com/ef-core@latest"></script>
<script src="https://unpkg.com/neonclear@latest"></script>
<script src="./neonclear.js"></script>
</body>
</html>
Loading

0 comments on commit 109c170

Please sign in to comment.