Multiple test-projects
This commit is contained in:
@@ -9,24 +9,71 @@ import sass from "rollup-plugin-sass";
|
||||
// `npm run dev` -> `production` is false
|
||||
const production = !process.env.ROLLUP_WATCH;
|
||||
|
||||
export default {
|
||||
input: 'test/index.jsx',
|
||||
output: {
|
||||
file: 'public/index.js',
|
||||
format: 'iife', // immediately-invoked function expression — suitable for <script> tags
|
||||
sourcemap: true
|
||||
export default [
|
||||
// Basic test
|
||||
{
|
||||
input: 'test/basic/index.jsx',
|
||||
output: {
|
||||
file: 'public/basic/index.js',
|
||||
format: 'iife', // immediately-invoked function expression — suitable for <script> tags
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
sass(),
|
||||
babel(), // babel
|
||||
resolve(), // node_modules
|
||||
commonjs(), // CJS-modules
|
||||
production && terser(), // minify, but only in production
|
||||
copy({
|
||||
targets: [
|
||||
{ src: 'test/basic/index.html', dest: 'public/basic' }
|
||||
],
|
||||
copyOnce: true
|
||||
})
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
sass(),
|
||||
babel(), // babel
|
||||
resolve(), // node_modules
|
||||
commonjs(), // CJS-modules
|
||||
production && terser(), // minify, but only in production
|
||||
copy({
|
||||
targets: [
|
||||
{ src: 'test/index.html', dest: 'public' }
|
||||
],
|
||||
copyOnce: true
|
||||
})
|
||||
]
|
||||
};
|
||||
// Todos MVC
|
||||
{
|
||||
input: 'test/todos-mvc/index.jsx',
|
||||
output: {
|
||||
file: 'public/todos-mvc/index.js',
|
||||
format: 'iife', // immediately-invoked function expression — suitable for <script> tags
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
sass(),
|
||||
babel(), // babel
|
||||
resolve(), // node_modules
|
||||
commonjs(), // CJS-modules
|
||||
production && terser(), // minify, but only in production
|
||||
copy({
|
||||
targets: [
|
||||
{ src: 'test/todos-mvc/index.html', dest: 'public/todos-mvc' }
|
||||
],
|
||||
copyOnce: true
|
||||
})
|
||||
]
|
||||
},
|
||||
// Tests index-page
|
||||
{
|
||||
input: 'test/index.jsx',
|
||||
output: {
|
||||
file: 'public/index.js',
|
||||
format: 'iife', // immediately-invoked function expression — suitable for <script> tags
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
sass(),
|
||||
babel(), // babel
|
||||
resolve(), // node_modules
|
||||
commonjs(), // CJS-modules
|
||||
production && terser(), // minify, but only in production
|
||||
copy({
|
||||
targets: [
|
||||
{ src: 'test/index.html', dest: 'public' }
|
||||
],
|
||||
copyOnce: true
|
||||
})
|
||||
]
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user