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 'locale': 'moment/locale'
31 EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }),
34 title: 'Inferno Typescript FuseBox Example',
35 template: 'src/index.html',
36 path: isProduction ? "/static" : "/"
40 bakeApiIntoBundle: 'app',
46 app = fuse.bundle('app').instructions('>index.tsx');
48 // Sparky.task('version', _ => setVersion());
49 Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/'));
50 Sparky.task('env', _ => (isProduction = true));
51 Sparky.task('copy-assets', () => Sparky.src('assets/**/**.*').dest('dist/'));
52 Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => {
57 Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => {
58 // fuse.dev({ reload: true }); // remove after demo