mirror of
https://github.com/NickKaramoff/shareon
synced 2025-02-03 01:08:13 +01:00
4fed2fcd7d
Since it bumps the version after it builds the packages, the package is being uploaded with wrong version
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
import postcssPluginCssnano from 'cssnano';
|
|
import rollupPluginBanner from 'rollup-plugin-banner';
|
|
import rollupPluginPostcss from 'rollup-plugin-postcss';
|
|
import rollupPluginStrip from '@rollup/plugin-strip';
|
|
import { terser as rollupPluginTerser } from 'rollup-plugin-terser';
|
|
import rollupPluginTypescript from '@rollup/plugin-typescript';
|
|
|
|
export const banner = () => rollupPluginBanner(
|
|
'<%= pkg.name %> by Nikita Karamov\nInspired by Likely (https://ilyabirman.net/projects/likely/)'
|
|
)
|
|
|
|
export const postcss = (file, minify) => rollupPluginPostcss({
|
|
extract: file || true,
|
|
plugins: [
|
|
minify && postcssPluginCssnano({
|
|
preset: 'default',
|
|
})
|
|
],
|
|
})
|
|
|
|
export const strip = () => rollupPluginStrip({
|
|
debugger: true,
|
|
include: ['**/*.js', '**/*.ts'],
|
|
functions: ['console.log', 'console.debug', 'assert.*'],
|
|
sourceMap: false,
|
|
});
|
|
|
|
export const terser = () => rollupPluginTerser({
|
|
sourcemap: false,
|
|
output: {
|
|
comments: false,
|
|
ecma: 5,
|
|
},
|
|
});
|
|
|
|
export const typescript = () => rollupPluginTypescript();
|