Added gulp plumber, gulp watch, parent package with scripts and windows batch files for everything.

This commit is contained in:
Jiiks 2018-01-21 10:38:49 +02:00
parent 623aaeb01a
commit 1f618684b8
6 changed files with 52 additions and 9 deletions

1
build.bat Normal file
View File

@ -0,0 +1 @@
npm run build

View File

@ -1,14 +1,27 @@
const
const
gulp = require('gulp'),
pump = require('pump'),
babel = require('gulp-babel');
babel = require('gulp-babel'),
plumber = require('gulp-plumber'),
watch = require('gulp-watch');
const task_babel = function () {
return pump([
gulp.src('src/**/*js'),
babel(),
gulp.dest('dist')
]);
gulp.src('src/**/*js'),
plumber(),
babel(),
gulp.dest('dist')
]);
}
gulp.task('babel', task_babel);
const watch_babel = function () {
return pump([
watch('src/**/*js'),
plumber(),
babel(),
gulp.dest('dist')
]);
}
gulp.task('build', task_babel);
gulp.task('watch', watch_babel);

View File

@ -21,9 +21,12 @@
"electron": "^1.7.10",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"pump": "^2.0.0"
"pump": "^2.0.0",
"gulp-plumber": "^1.2.0",
"gulp-watch": "^5.0.0"
},
"scripts": {
"gulp": "gulp"
"build": "gulp build",
"watch": "gulp watch"
}
}

24
package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "betterdiscord",
"description": "BetterDiscord",
"author": "Jiiks",
"version": "0.4.0",
"homepage": "https://betterdiscord.net",
"license": "MIT",
"main": "index.js",
"contributors": [
"Jiiks",
"Pohky"
],
"repository": {
"type": "git",
"url": "https://github.com/Jiiks/BetterDiscordApp.git"
},
"private": false,
"devDependencies": {},
"scripts": {
"build": "cd ./client && npm run build && cd ../core && npm run build",
"watch_client": "cd ./client && npm run watch",
"watch_core": "cd ./core && npm run watch"
}
}

1
watch_client.bat Normal file
View File

@ -0,0 +1 @@
npm run watch_client

1
watch_core.bat Normal file
View File

@ -0,0 +1 @@
npm run watch_core