mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 05:43:09 +02:00
Update gulpfile.ts
This commit is contained in:
parent
7873905cde
commit
f05c5ff617
1 changed files with 5 additions and 5 deletions
10
gulpfile.ts
10
gulpfile.ts
|
@ -23,7 +23,6 @@ const uglifyes = require('uglify-es');
|
||||||
|
|
||||||
const locales = require('./locales');
|
const locales = require('./locales');
|
||||||
import { fa } from './src/misc/fa';
|
import { fa } from './src/misc/fa';
|
||||||
const client = require('./built/client/meta.json');
|
|
||||||
import config from './src/config';
|
import config from './src/config';
|
||||||
|
|
||||||
const uglify = uglifyComposer(uglifyes, console);
|
const uglify = uglifyComposer(uglifyes, console);
|
||||||
|
@ -117,8 +116,9 @@ gulp.task('build:client', [
|
||||||
'copy:client'
|
'copy:client'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
gulp.task('build:client:script', () =>
|
gulp.task('build:client:script', () => {
|
||||||
gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
|
const client = require('./built/client/meta.json');
|
||||||
|
return gulp.src(['./src/client/app/boot.js', './src/client/app/safe.js'])
|
||||||
.pipe(replace('VERSION', JSON.stringify(client.version)))
|
.pipe(replace('VERSION', JSON.stringify(client.version)))
|
||||||
.pipe(replace('API', JSON.stringify(config.api_url)))
|
.pipe(replace('API', JSON.stringify(config.api_url)))
|
||||||
.pipe(replace('ENV', JSON.stringify(env)))
|
.pipe(replace('ENV', JSON.stringify(env)))
|
||||||
|
@ -126,8 +126,8 @@ gulp.task('build:client:script', () =>
|
||||||
.pipe(isProduction ? uglify({
|
.pipe(isProduction ? uglify({
|
||||||
toplevel: true
|
toplevel: true
|
||||||
} as any) : gutil.noop())
|
} as any) : gutil.noop())
|
||||||
.pipe(gulp.dest('./built/client/assets/')) as any
|
.pipe(gulp.dest('./built/client/assets/'));
|
||||||
);
|
});
|
||||||
|
|
||||||
gulp.task('build:client:styles', () =>
|
gulp.task('build:client:styles', () =>
|
||||||
gulp.src('./src/client/app/init.css')
|
gulp.src('./src/client/app/init.css')
|
||||||
|
|
Loading…
Reference in a new issue