8 } = require('fuse-box');
9 // const transformInferno = require('../../dist').default
10 const transformInferno = require('ts-transform-inferno').default;
11 const transformClasscat = require('ts-transform-classcat').default;
13 let isProduction = false;
14 // var setVersion = require('./set_version.js').setVersion;
16 Sparky.task('config', _ => {
20 output: 'dist/$name.js',
21 experimentalFeatures: true,
23 sourceMaps: !isProduction,
25 before: [transformClasscat(), transformInferno()],
28 EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }),
31 title: 'Inferno Typescript FuseBox Example',
32 template: 'src/index.html',
33 path: isProduction ? "/static" : "/"
37 bakeApiIntoBundle: 'app',
43 app = fuse.bundle('app').instructions('>index.tsx');
45 // Sparky.task('version', _ => setVersion());
46 Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/'));
47 Sparky.task('env', _ => (isProduction = true));
48 Sparky.task('copy-assets', () => Sparky.src('assets/**/**.*').dest('dist/'));
49 Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => {
54 Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => {
55 // fuse.dev({ reload: true }); // remove after demo