Skip to content

Commit

Permalink
build: improve banner comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbin committed Oct 9, 2019
1 parent 9270cdf commit 82855cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
20 changes: 9 additions & 11 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
const pkg = require('./package.json');

const banner = `
/*!
* ____ _ _ ___ _____ ___ _ _ _____ ____ _ _ ____ ____
* | _ \\| | | |/ _ \\|_ _|/ _ \\| | | |_ _| __| | | | __| _ \\
* | |_| | |_| | | | | | | | | | | | | | | | | |__| | | | |__| |_| |
* | __/| _ | | | | | | | | | | |_| | | | | __| |/\\| | __| /
* | | | | | | |_| | | | | |_| |\\ / _| |_| |__| /\\ | |__| |\\ \\
* |_| |_| |_|\\___/ |_| \\___/ \\_/ |_____|____|_/ \\_|____|_| \\_\\
const banner = String.raw`/*!
* ____ __ ______ __________ _ _____________ ____________
* / __ \/ / / / __ \/_ __/ __ \ | / / _/ ____/ | / / ____/ __ \
* / /_/ / /_/ / / / / / / / / / / | / // // __/ | | /| / / __/ / /_/ /
* / ____/ __ / /_/ / / / / /_/ /| |/ // // /___ | |/ |/ / /___/ _, _/
* /_/ /_/ /_/\____/ /_/ \____/ |___/___/_____/ |__/|__/_____/_/ |_|
*
* ${pkg.name} - v${pkg.version}
* ${pkg.description}
Expand All @@ -22,12 +20,12 @@ module.exports = ctx => ({
// map: ctx.options.map,
plugins: {
'postcss-header': {
header: banner,
header: banner
},
'autoprefixer': {
autoprefixer: {
cascade: false,
browsers: ['> 1%', 'last 2 versions', 'Firefox ESR']
},
cssnano: ctx.env === 'production' ? {} : false
}
})
});
14 changes: 4 additions & 10 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import pkg from './package.json';

const banner = String.raw`
/*!
const banner = String.raw`/*!
* ____ __ ______ __________ _ _____________ ____________
* / __ \/ / / / __ \/_ __/ __ \ | / / _/ ____/ | / / ____/ __ \
* / /_/ / /_/ / / / / / / / / / / | / // // __/ | | /| / / __/ / /_/ /
Expand All @@ -27,25 +26,20 @@ export default [
{
name: 'photoviewer',
banner,
file: "dist/photoviewer.js",
file: 'dist/photoviewer.js',
format: 'umd'
},
{
file: 'dist/photoviewer.common.js',
banner,
format: 'cjs'

},
{
file: 'dist/photoviewer.esm.js',
banner,
format: 'es'
}
],
plugins: [
babel({ exclude: 'node_modules/**' }),
resolve(),
commonjs(),
],
},
plugins: [babel({ exclude: 'node_modules/**' }), resolve(), commonjs()]
}
];

0 comments on commit 82855cc

Please sign in to comment.