mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 11:51:08 +00:00
parent
d63eb7c8f5
commit
1b9f2fa5f7
1 changed files with 3 additions and 5 deletions
8
ui/fuse.js
vendored
8
ui/fuse.js
vendored
|
@ -6,12 +6,10 @@ const {
|
||||||
WebIndexPlugin,
|
WebIndexPlugin,
|
||||||
QuantumPlugin,
|
QuantumPlugin,
|
||||||
} = require('fuse-box');
|
} = require('fuse-box');
|
||||||
// const transformInferno = require('../../dist').default
|
|
||||||
const transformInferno = require('ts-transform-inferno').default;
|
const transformInferno = require('ts-transform-inferno').default;
|
||||||
const transformClasscat = require('ts-transform-classcat').default;
|
const transformClasscat = require('ts-transform-classcat').default;
|
||||||
let fuse, app;
|
let fuse, app;
|
||||||
let isProduction = false;
|
let isProduction = false;
|
||||||
// var setVersion = require('./set_version.js').setVersion;
|
|
||||||
|
|
||||||
Sparky.task('config', _ => {
|
Sparky.task('config', _ => {
|
||||||
fuse = new FuseBox({
|
fuse = new FuseBox({
|
||||||
|
@ -45,18 +43,18 @@ Sparky.task('config', _ => {
|
||||||
});
|
});
|
||||||
app = fuse.bundle('app').instructions('>index.tsx');
|
app = fuse.bundle('app').instructions('>index.tsx');
|
||||||
});
|
});
|
||||||
// Sparky.task('version', _ => setVersion());
|
|
||||||
Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/'));
|
Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/'));
|
||||||
Sparky.task('env', _ => (isProduction = true));
|
Sparky.task('env', _ => (isProduction = true));
|
||||||
Sparky.task('copy-assets', () =>
|
Sparky.task('copy-assets', () =>
|
||||||
Sparky.src('assets/**/**.*').dest(isProduction ? 'dist/' : 'dist/static')
|
Sparky.src('assets/**/**.*').dest(isProduction ? 'dist/' : 'dist/static')
|
||||||
);
|
);
|
||||||
Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => {
|
Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => {
|
||||||
fuse.dev();
|
fuse.dev({
|
||||||
|
fallback: 'index.html',
|
||||||
|
});
|
||||||
app.hmr().watch();
|
app.hmr().watch();
|
||||||
return fuse.run();
|
return fuse.run();
|
||||||
});
|
});
|
||||||
Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => {
|
Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => {
|
||||||
// fuse.dev({ reload: true }); // remove after demo
|
|
||||||
return fuse.run();
|
return fuse.run();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue