mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
be671003e9
* playground: (27 commits) update update comments Simplify helpers Convert remainder of docs to md Convert operators docs to use md Convert remainder of modules docs to md No need for duplicate strip-indent new approach to stripping leading whitespace Strip indentation for nested blocks Different approach to preventing <p> tags with nested code examples Convert color module to md Convert breaking changes docs to md Convert at-rules docs to markdown use line feed ` ` instead of `<br />` Allow codeExamples to be nested in markdown Fewer skips more verbose skip blog index pages Try fewer assets skip fewer internal links ...
47 lines
1.0 KiB
JavaScript
47 lines
1.0 KiB
JavaScript
const {babel} = require('@rollup/plugin-babel');
|
|
const commonjs = require('@rollup/plugin-commonjs');
|
|
const inject = require('@rollup/plugin-inject');
|
|
const {nodeResolve} = require('@rollup/plugin-node-resolve');
|
|
const terser = require('@rollup/plugin-terser');
|
|
const {defineConfig} = require('rollup');
|
|
|
|
const prod = process.env.BABEL_ENV === 'production';
|
|
|
|
const plugins = [
|
|
nodeResolve({
|
|
extensions: ['.mjs', '.js', '.json', '.node', '.ts'],
|
|
browser: true,
|
|
}),
|
|
commonjs(),
|
|
babel({extensions: ['.js', '.ts'], babelHelpers: 'bundled'}),
|
|
inject({
|
|
$: 'jquery',
|
|
jQuery: 'jquery',
|
|
}),
|
|
];
|
|
|
|
if (prod) {
|
|
plugins.push(terser());
|
|
}
|
|
|
|
module.exports = defineConfig([
|
|
{
|
|
input: 'source/assets/js/sass.ts',
|
|
output: {
|
|
file: 'source/assets/dist/js/sass.js',
|
|
format: 'iife',
|
|
sourcemap: !prod,
|
|
},
|
|
plugins,
|
|
},
|
|
{
|
|
input: 'source/assets/js/playground.ts',
|
|
output: {
|
|
file: 'source/assets/dist/js/playground.js',
|
|
format: 'iife',
|
|
sourcemap: !prod,
|
|
},
|
|
plugins,
|
|
},
|
|
]);
|