How to use rollup-plugin-bundleutils - 10 common examples

To help you get started, we’ve selected a few rollup-plugin-bundleutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pschroen / alien.js / rollup.config.js View on Github external
import { timestamp, terser } from 'rollup-plugin-bundleutils';

import { version } from './package.json';

export default {
    input: 'src/Alien.js',
    output: [{
        file: process.env.terser ? 'build/alien.min.js' : 'build/alien.js',
        format: 'es'
    }],
    plugins: [
        process.env.terser && terser({
            output: {
                preamble: `//   _  /._  _  r${version.split('.')[1]} ${timestamp()}\n//  /_|///_'/ /`
            },
            keep_classnames: true,
            keep_fnames: true,
            safari10: true
        })
    ]
};
github pschroen / alien.js / examples / about / rollup.config.js View on Github external
import { version } from './node_modules/alien.js/package.json';

const production = !process.env.ROLLUP_WATCH;

export default {
    input: 'src/Main.js',
    output: {
        file: 'public/assets/js/app.js',
        format: 'iife'
    },
    plugins: [
        resolve({ browser: true }),
        glslify(),
        eslint({ include: 'src/**' }),
        production && terser({
            output: {
                preamble: `//   _  /._  _  r${version.split('.')[1]} ${timestamp()}\n//  /_|///_'/ /`
            },
            keep_classnames: true,
            keep_fnames: true
        })
    ],
    watch: {
        chokidar: true,
        clearScreen: false,
        include: 'src/**'
    }
};
github pschroen / alien.js / examples / loader / rollup.config.js View on Github external
import { eslint } from 'rollup-plugin-eslint';

import { version } from './alien.js/package.json';

const production = !process.env.ROLLUP_WATCH;

export default {
    input: 'src/Main.js',
    output: {
        file: 'public/assets/js/app.js',
        format: 'iife'
    },
    plugins: [
        glslify(),
        eslint({ include: ['src/**', 'alien.js/**'] }),
        production && terser({
            output: {
                preamble: `//   _  /._  _  r${version.split('.')[1]} ${timestamp()}\n//  /_|///_'/ /`
            },
            keep_classnames: true,
            keep_fnames: true
        })
    ],
    watch: {
        chokidar: true,
        clearScreen: false,
        include: ['src/**', 'alien.js/**']
    }
};
github pschroen / alien.js / examples / banner / rollup.config.js View on Github external
const production = !process.env.ROLLUP_WATCH;
const project = path.basename(__dirname);

export default {
    input: 'src/Main.js',
    output: {
        file: `public/assets/${project}.js`,
        format: 'iife'
    },
    plugins: [
        resolve({ browser: true }),
        glslify(),
        eslint({ include: ['src/**', 'alien.js/**'] }),
        production && babel({ compact: false }),
        production && terser({
            output: {
                preamble: `//   _  /._  _  r${version.split('.')[1]}.${project} ${timestamp()}\n//  /_|///_'/ /`
            },
            safari10: true
        })
    ],
    watch: {
        chokidar: true,
        clearScreen: false,
        include: ['src/**', 'alien.js/**']
    }
};
github pschroen / alien.js / examples / banner / rollup.config.js View on Github external
import { version } from './alien.js/package.json';

const production = !process.env.ROLLUP_WATCH;
const project = path.basename(__dirname);

export default {
    input: 'src/Main.js',
    output: {
        file: `public/assets/${project}.js`,
        format: 'iife'
    },
    plugins: [
        resolve({ browser: true }),
        glslify(),
        eslint({ include: ['src/**', 'alien.js/**'] }),
        production && babel({ compact: false }),
        production && terser({
            output: {
                preamble: `//   _  /._  _  r${version.split('.')[1]}.${project} ${timestamp()}\n//  /_|///_'/ /`
            },
            safari10: true
        })
    ],
    watch: {
        chokidar: true,
        clearScreen: false,
        include: ['src/**', 'alien.js/**']
    }
};
github pschroen / alien.js / examples / gsap / rollup.config.js View on Github external
import glslify from 'rollup-plugin-glslify';
import { eslint } from 'rollup-plugin-eslint';

const production = !process.env.ROLLUP_WATCH;

export default {
    input: 'src/Main.js',
    output: {
        file: 'public/assets/js/app.js',
        format: 'iife'
    },
    plugins: [
        glslify(),
        eslint({ include: 'src/**' }),
        production && terser({
            output: {
                preamble: `// ${timestamp()}`
            },
            keep_classnames: true,
            keep_fnames: true
        })
    ],
    watch: {
        chokidar: true,
        clearScreen: false,
        include: 'src/**'
    }
};
github pschroen / alien.js / src / utils.js View on Github external
'Render',
    'Timer',
    'Device',
    'Accelerometer',
    'Mouse',
    'Assets',
    'Storage',
    'WebAudio',
    'TweenManager',
    'Interpolation',
    'CanvasFont',
    'Utils3D',
    'Stage'
].concat(values));
const unexport = bundleutils.unexport;
const babel = bundleutils.babel;
const uglify = bundleutils.uglify;

export { pad, timestamp, singletons, unexport, babel, uglify };
github pschroen / alien.js / src / utils.js View on Github external
/**
 * @author Patrick Schroen / https://github.com/pschroen
 */

import bundleutils from 'rollup-plugin-bundleutils';

const pad = bundleutils.pad;
const timestamp = bundleutils.timestamp;
const singletons = (values = []) => bundleutils.singletons([
    'Utils',
    'Render',
    'Timer',
    'Device',
    'Accelerometer',
    'Mouse',
    'Assets',
    'Storage',
    'WebAudio',
    'TweenManager',
    'Interpolation',
    'CanvasFont',
    'Utils3D',
    'Stage'
github pschroen / alien.js / src / utils.js View on Github external
const singletons = (values = []) => bundleutils.singletons([
    'Utils',
    'Render',
    'Timer',
    'Device',
    'Accelerometer',
    'Mouse',
    'Assets',
    'Storage',
    'WebAudio',
    'TweenManager',
    'Interpolation',
    'CanvasFont',
    'Utils3D',
    'Stage'
].concat(values));
const unexport = bundleutils.unexport;
github pschroen / alien.js / src / utils.js View on Github external
/**
 * @author Patrick Schroen / https://github.com/pschroen
 */

import bundleutils from 'rollup-plugin-bundleutils';

const pad = bundleutils.pad;
const timestamp = bundleutils.timestamp;
const singletons = (values = []) => bundleutils.singletons([
    'Utils',
    'Render',
    'Timer',
    'Device',
    'Accelerometer',
    'Mouse',
    'Assets',
    'Storage',
    'WebAudio',
    'TweenManager',
    'Interpolation',
    'CanvasFont',
    'Utils3D',
    'Stage'
].concat(values));