mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 10:49:02 +00:00
Accept file, blob decoding Remove double init of window handler Added confirmation/acceptance message Add lazy IDs to transferred files for file owner Added chat class- initial support for slash commands Abstraction of chat to its own class Removed underscore from vendors, switching to import. Increased username color values Not localizing username, organizing slash commands Keeping context Support for symbols/emojis. Fixes #9 Added back npm scripts, added method to check if log messages contain usernames Checks and balances Better parsing of commands and organization of valid commands Fixed #10 - Added running version on modal and about section, Updated disclaimer/wording, displaying public IP if available through server File transfer pre-confirmation Encrypting stringified object versus string
54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
import gulp from 'gulp';
|
|
import uglify from 'gulp-uglify';
|
|
import nodemon from 'gulp-nodemon';
|
|
import browserify from 'browserify';
|
|
import babel from 'babelify';
|
|
import source from 'vinyl-source-stream';
|
|
import buffer from 'vinyl-buffer';
|
|
import childProcess from 'child_process';
|
|
|
|
let spawn = childProcess.spawn;
|
|
|
|
gulp.task('bundle', function() {
|
|
return browserify('src/js/main.js', {
|
|
debug: true
|
|
}).transform(babel.configure({
|
|
presets: ['es2015']
|
|
})).bundle()
|
|
.pipe(source('main.js'))
|
|
.pipe(buffer())
|
|
.pipe(uglify())
|
|
.pipe(gulp.dest('src/public'));
|
|
});
|
|
|
|
gulp.task('dev', function() {
|
|
return browserify('src/js/main.js', {
|
|
debug: true
|
|
}).transform(babel.configure({
|
|
presets: ['es2015']
|
|
})).bundle()
|
|
.pipe(source('main.js'))
|
|
.pipe(buffer())
|
|
.pipe(gulp.dest('src/public'));
|
|
});
|
|
|
|
gulp.task('start', function() {
|
|
nodemon({
|
|
script: 'index.js',
|
|
ext: 'css js mustache',
|
|
ignore: ['src/public/main.js'],
|
|
env: {
|
|
'NODE_ENV': 'development'
|
|
},
|
|
tasks: ['dev']
|
|
});
|
|
});
|
|
|
|
gulp.task('test', function() {
|
|
let test = spawn(
|
|
'mocha',
|
|
['test', '--compilers', 'js:babel-core/register'],
|
|
{stdio: 'inherit'}
|
|
);
|
|
});
|