Commit de946977 authored by Robert Knight's avatar Robert Knight

Merge pull request #3004 from hypothesis/fix-docker-build

Fix docker build
parents 77003584 f3d2e836
......@@ -12,7 +12,6 @@ var gulpIf = require('gulp-if');
var gulpUtil = require('gulp-util');
var sass = require('gulp-sass');
var postcss = require('gulp-postcss');
var runSequence = require('run-sequence');
var sourcemaps = require('gulp-sourcemaps');
var manifest = require('./scripts/gulp/manifest');
......@@ -62,10 +61,6 @@ var appBundles = [{
name: 'app',
transforms: ['coffee'],
entry: './h/static/scripts/app.coffee',
},{
// Browser extension background script
name: 'extension',
entry: './h/browser/chrome/lib/extension',
},{
// The Annotator library which provides annotation controls on
// the page and sets up the sidebar
......@@ -102,6 +97,23 @@ gulp.task('watch-app-js', ['build-vendor-js'], function () {
});
});
var extensionBundleConfig = {
name: 'extension',
entry: './h/browser/chrome/lib/extension',
path: SCRIPT_DIR,
external: vendorModules,
minify: IS_PRODUCTION_BUILD,
noParse: vendorBundles.noParseModules,
};
gulp.task('build-extension-js', ['build-vendor-js'], function () {
return createBundle(extensionBundleConfig);
});
gulp.task('watch-extension-js', ['build-vendor-js'], function () {
return createBundle(extensionBundleConfig, {watch: true});
});
var styleFiles = [
// H
'./h/static/styles/admin.scss',
......@@ -174,8 +186,6 @@ function generateManifest() {
});
}
gulp.task('generate-manifest', generateManifest);
gulp.task('watch-manifest', function () {
gulp.watch(MANIFEST_SOURCE_FILES, batch(function (events, done) {
endOfStream(generateManifest(), function () {
......@@ -184,13 +194,25 @@ gulp.task('watch-manifest', function () {
}));
});
gulp.task('build', function (callback) {
runSequence(['build-app-js', 'build-css',
'build-fonts', 'build-images'],
'generate-manifest',
callback);
});
gulp.task('watch', ['watch-app-js', 'watch-css',
'watch-fonts', 'watch-images',
gulp.task('build-app',
['build-app-js',
'build-css',
'build-fonts',
'build-images'],
generateManifest);
gulp.task('build',
['build-app-js',
'build-extension-js',
'build-css',
'build-fonts',
'build-images'],
generateManifest);
gulp.task('watch',
['watch-app-js',
'watch-extension-js',
'watch-css',
'watch-fonts',
'watch-images',
'watch-manifest']);
......@@ -54,7 +54,6 @@
"raf": "^3.1.0",
"raven-js": "^2.0.2",
"retry": "^0.8.0",
"run-sequence": "^1.1.5",
"scroll-into-view": "^1.3.1",
"showdown": "^1.2.1",
"through2": "^2.0.1",
......@@ -87,9 +86,6 @@
"engines": {
"node": "0.10.x"
},
"scripts": {
"build-assets": "gulp build"
},
"repository": {
"type": "git",
"url": "https://github.com/hypothesis/h.git"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment