diff options
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js index c1012d5aa..f4c9fc9dd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -195,6 +195,21 @@ gulp.task('manifest:production', function () { .pipe(gulp.dest('./dist/', { overwrite: true })) }) +gulp.task('manifest:testing', function () { + return gulp.src([ + './dist/firefox/manifest.json', + './dist/chrome/manifest.json', + ], {base: './dist/'}) + + // Exclude chromereload script in production: + .pipe(jsoneditor(function (json) { + json.permissions = [...json.permissions, 'webRequestBlocking'] + return json + })) + + .pipe(gulp.dest('./dist/', { overwrite: true })) +}) + gulp.task('copy', gulp.series( gulp.parallel(...copyTaskNames), @@ -212,6 +227,15 @@ gulp.task('dev:copy', ) ) +gulp.task('test:copy', + gulp.series( + gulp.parallel(...copyDevTaskNames), + 'manifest:chrome', + 'manifest:opera', + 'manifest:testing' + ) +) + // scss compilation and autoprefixing tasks gulp.task('build:scss', createScssBuildTask({ @@ -383,6 +407,18 @@ gulp.task('dev', ) ) +gulp.task('dev:test', + gulp.series( + 'clean', + 'dev:scss', + gulp.parallel( + 'dev:extension:js', + 'test:copy', + 'dev:reload' + ) + ) +) + gulp.task('dev:extension', gulp.series( 'clean', |