mirror of
https://github.com/thesephist/blocks.css.git
synced 2024-10-03 22:07:10 +03:00
Allow packaging with rollup
This commit is contained in:
parent
472b28260f
commit
f30efd2bef
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,6 @@
|
||||
# blocks.css ignores
|
||||
dist/
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
26
package.json
26
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
rollup.config.js
Normal file
27
rollup.config.js
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user