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', () =>
52 Sparky.src('assets/**/**.*').dest(isProduction ? 'dist/' : 'dist/static')
54 Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => {
59 Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => {
60 // fuse.dev({ reload: true }); // remove after demo