mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-29 04:17:41 +02:00
webext tools for firefox
This commit is contained in:
parent
44f1ce621d
commit
cb7c35ad77
27
gulpfile.js
27
gulpfile.js
@ -10,8 +10,10 @@
|
|||||||
browserify = require('browserify'),
|
browserify = require('browserify'),
|
||||||
source = require('vinyl-source-stream'),
|
source = require('vinyl-source-stream'),
|
||||||
googleWebFonts = require('gulp-google-webfonts'),
|
googleWebFonts = require('gulp-google-webfonts'),
|
||||||
webpack = require('webpack-stream')
|
webpack = require('webpack-stream'),
|
||||||
jeditor = require("gulp-json-editor");
|
jeditor = require("gulp-json-editor"),
|
||||||
|
gulpUtil = require('gulp-util'),
|
||||||
|
child = require('child_process');
|
||||||
|
|
||||||
var paths = {};
|
var paths = {};
|
||||||
paths.dist = './dist/';
|
paths.dist = './dist/';
|
||||||
@ -254,6 +256,23 @@ gulp.task('dist-edge', ['dist:edge'], function (cb) {
|
|||||||
gulp.task('webfonts', function () {
|
gulp.task('webfonts', function () {
|
||||||
return gulp.src('./webfonts.list')
|
return gulp.src('./webfonts.list')
|
||||||
.pipe(googleWebFonts({}))
|
.pipe(googleWebFonts({}))
|
||||||
.pipe(gulp.dest(paths.webfontsDir))
|
.pipe(gulp.dest(paths.webfontsDir));
|
||||||
;
|
});
|
||||||
|
|
||||||
|
function npmCommand(commands, cb) {
|
||||||
|
var npmLogger = (buffer) => {
|
||||||
|
buffer.toString()
|
||||||
|
.split(/\n/)
|
||||||
|
.forEach((message) => gulpUtil.log(message));
|
||||||
|
};
|
||||||
|
var npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||||
|
var npmChild = child.spawn(npmCommand, commands);
|
||||||
|
npmChild.stdout.on('data', npmLogger);
|
||||||
|
npmChild.stderr.on('data', npmLogger);
|
||||||
|
npmChild.stderr.on('close', cb);
|
||||||
|
return npmChild;
|
||||||
|
}
|
||||||
|
|
||||||
|
gulp.task('webext:firefox', function (cb) {
|
||||||
|
return npmCommand(['run', 'start:firefox'], cb);
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "bitwarden",
|
"name": "bitwarden",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
|
"scripts": {
|
||||||
|
"start:firefox": "web-ext run --source-dir ./dist/"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"jquery": "2.2.4",
|
"jquery": "2.2.4",
|
||||||
"bootstrap": "3.3.7",
|
"bootstrap": "3.3.7",
|
||||||
@ -34,6 +37,9 @@
|
|||||||
"node-forge": "0.7.1",
|
"node-forge": "0.7.1",
|
||||||
"webpack-stream": "4.0.0",
|
"webpack-stream": "4.0.0",
|
||||||
"gulp-json-editor": "2.2.1",
|
"gulp-json-editor": "2.2.1",
|
||||||
"papaparse": "4.3.5"
|
"papaparse": "4.3.5",
|
||||||
|
"web-ext": "2.0.0",
|
||||||
|
"child_process": "1.0.2",
|
||||||
|
"gulp-util": "3.0.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user