8 } = require('fuse-box');
9 const transformInferno = require('ts-transform-inferno').default;
10 const transformClasscat = require('ts-transform-classcat').default;
12 let isProduction = false;
14 Sparky.task('config', _ => {
18 output: 'dist/$name.js',
19 experimentalFeatures: true,
21 sourceMaps: !isProduction,
23 before: [transformClasscat(), transformInferno()],
26 locale: 'moment/locale',
29 EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }),
32 title: 'Inferno Typescript FuseBox Example',
33 template: 'src/index.html',
34 path: isProduction ? '/static' : '/',
38 bakeApiIntoBundle: 'app',
44 app = fuse.bundle('app').instructions('>index.tsx');
46 Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/'));
47 Sparky.task('env', _ => (isProduction = true));
48 Sparky.task('copy-assets', () =>
49 Sparky.src('assets/**/**.*').dest(isProduction ? 'dist/' : 'dist/static')
51 Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => {
53 fallback: 'index.html',
58 Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => {