Skip to content

Commit

Permalink
Add rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
deoostfrees committed Jan 20, 2022
1 parent 5c3ca7a commit 5248362
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import postcss from 'rollup-plugin-postcss'
import license from 'rollup-plugin-license'

const pkg = require('./package.json')

const bannerContent = `
Gibki
@author ${pkg.author}
@version ${pkg.version}
@url ${pkg.homepage}
${pkg.license} license`

let rollupBuilds

/**
* Build CSS
*
*/
if (process.env.BUILD) {
rollupBuilds = [{
input: './scss/gibki.scss',
output: [
{
file: './css/gibki.css'
}
],
plugins: [
resolve({
browser: true
}),
commonjs(),
postcss({
extract: true
}),
license({
banner: {
content: bannerContent
}
})
],
watch: {
clearScreen: false
}
},
{
input: './scss/gibki.scss',
output: [
{
file: './css/gibki.min.css'
}
],
plugins: [
resolve({
browser: true
}),
commonjs(),
postcss({
extract: true,
minimize: true
}),
license({
banner: {
content: bannerContent
}
})
],
watch: {
clearScreen: false
}
}]
}

export default rollupBuilds

0 comments on commit 5248362

Please sign in to comment.