mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Migrate clean
and importl10n
target to gulp
This commit is contained in:
parent
b8aaa24257
commit
96cca2b37a
3 changed files with 31 additions and 23 deletions
24
gulpfile.js
24
gulpfile.js
|
@ -17,10 +17,15 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs');
|
||||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util');
|
||||
var rimraf = require('rimraf');
|
||||
var stream = require('stream');
|
||||
|
||||
var BUILD_DIR = 'build/';
|
||||
var L10N_DIR = 'l10n/';
|
||||
|
||||
require('./make.js');
|
||||
|
||||
function createStringSource(filename, content) {
|
||||
|
@ -56,6 +61,13 @@ gulp.task('server', function () {
|
|||
server.start();
|
||||
});
|
||||
|
||||
gulp.task('clean', function(callback) {
|
||||
console.log();
|
||||
console.log('### Cleaning up project builds');
|
||||
|
||||
rimraf(BUILD_DIR, callback);
|
||||
});
|
||||
|
||||
gulp.task('makefile', function () {
|
||||
var makefileContent = 'help:\n\tgulp\n\n';
|
||||
var targetsNames = [];
|
||||
|
@ -68,6 +80,18 @@ gulp.task('makefile', function () {
|
|||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('importl10n', function() {
|
||||
var locales = require('./external/importL10n/locales.js');
|
||||
|
||||
console.log();
|
||||
console.log('### Importing translations from mozilla-aurora');
|
||||
|
||||
if (!fs.existsSync(L10N_DIR)) {
|
||||
fs.mkdirSync(L10N_DIR);
|
||||
}
|
||||
locales.downloadL10n(L10N_DIR);
|
||||
});
|
||||
|
||||
// Getting all shelljs registered tasks and register them with gulp
|
||||
var gulpContext = false;
|
||||
for (var taskName in global.target) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue