Skip to content

Commit

Permalink
Allow packaging with rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
thesephist committed Jun 12, 2019
1 parent 472b282 commit f30efd2
Show file tree
Hide file tree
Showing 4 changed files with 1,386 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,3 +1,6 @@
# blocks.css ignores
dist/

# Logs
logs
*.log
Expand Down
26 changes: 19 additions & 7 deletions package.json
@@ -1,9 +1,21 @@
{
"name": "blocks.css",
"version": "0.1.0",
"description": "Add some dimension to your page with blocks",
"main": "/src/blocks.css",
"repository": "git@github.com:thesephist/blocks.css.git",
"author": "Linus Lee <linus@thesephist.com>",
"license": "MIT"
"name": "blocks.css",
"version": "0.1.0",
"description": "Add some dimension to your page with blocks",
"main": "/src/blocks.css",
"repository": "git@github.com:thesephist/blocks.css.git",
"author": "Linus Lee <linus@thesephist.com>",
"license": "MIT",
"scripts": {
"build": "rollup --config rollup.config.js",
"clean": "git clean -fxd"
},
"files": [
"src",
"dist"
],
"devDependencies": {
"rollup": "^1.15.1",
"rollup-plugin-postcss": "^2.0.3"
}
}
27 changes: 27 additions & 0 deletions rollup.config.js
@@ -0,0 +1,27 @@
import postcss from 'rollup-plugin-postcss'

const bundleNames = [
'blocks',
'reset',
];

const configs = bundleNames.map(name => {
return {
input: `src/${name}.css`,
output: {
file: `dist/${name}.min.css`,
format: 'es',
},
plugins: [
postcss({
minimize: true,
sourceMap: true,
extract: true,
modules: false,
}),
],
}
});

export default configs

0 comments on commit f30efd2

Please sign in to comment.