Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
})
]
};
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/**'
}
};
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/**']
}
};
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/**']
}
};
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/**']
}
};
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/**'
}
};
'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 };
/**
* @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'
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;
/**
* @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));