Multiple test-projects

This commit is contained in:
2019-10-22 19:21:01 +02:00
parent afdffe57f9
commit 31cfda50f5
14 changed files with 205 additions and 54 deletions

View File

@@ -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
})
]
}
];