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'); ...@@ -12,7 +12,6 @@ var gulpIf = require('gulp-if');
var gulpUtil = require('gulp-util'); var gulpUtil = require('gulp-util');
var sass = require('gulp-sass'); var sass = require('gulp-sass');
var postcss = require('gulp-postcss'); var postcss = require('gulp-postcss');
var runSequence = require('run-sequence');
var sourcemaps = require('gulp-sourcemaps'); var sourcemaps = require('gulp-sourcemaps');
var manifest = require('./scripts/gulp/manifest'); var manifest = require('./scripts/gulp/manifest');
...@@ -62,10 +61,6 @@ var appBundles = [{ ...@@ -62,10 +61,6 @@ var appBundles = [{
name: 'app', name: 'app',
transforms: ['coffee'], transforms: ['coffee'],
entry: './h/static/scripts/app.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 Annotator library which provides annotation controls on
// the page and sets up the sidebar // the page and sets up the sidebar
...@@ -102,6 +97,23 @@ gulp.task('watch-app-js', ['build-vendor-js'], function () { ...@@ -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 = [ var styleFiles = [
// H // H
'./h/static/styles/admin.scss', './h/static/styles/admin.scss',
...@@ -174,8 +186,6 @@ function generateManifest() { ...@@ -174,8 +186,6 @@ function generateManifest() {
}); });
} }
gulp.task('generate-manifest', generateManifest);
gulp.task('watch-manifest', function () { gulp.task('watch-manifest', function () {
gulp.watch(MANIFEST_SOURCE_FILES, batch(function (events, done) { gulp.watch(MANIFEST_SOURCE_FILES, batch(function (events, done) {
endOfStream(generateManifest(), function () { endOfStream(generateManifest(), function () {
...@@ -184,13 +194,25 @@ gulp.task('watch-manifest', function () { ...@@ -184,13 +194,25 @@ gulp.task('watch-manifest', function () {
})); }));
}); });
gulp.task('build', function (callback) { gulp.task('build-app',
runSequence(['build-app-js', 'build-css', ['build-app-js',
'build-fonts', 'build-images'], 'build-css',
'generate-manifest', 'build-fonts',
callback); 'build-images'],
}); generateManifest);
gulp.task('watch', ['watch-app-js', 'watch-css', gulp.task('build',
'watch-fonts', 'watch-images', ['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']); 'watch-manifest']);
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
"raf": "^3.1.0", "raf": "^3.1.0",
"raven-js": "^2.0.2", "raven-js": "^2.0.2",
"retry": "^0.8.0", "retry": "^0.8.0",
"run-sequence": "^1.1.5",
"scroll-into-view": "^1.3.1", "scroll-into-view": "^1.3.1",
"showdown": "^1.2.1", "showdown": "^1.2.1",
"through2": "^2.0.1", "through2": "^2.0.1",
...@@ -87,9 +86,6 @@ ...@@ -87,9 +86,6 @@
"engines": { "engines": {
"node": "0.10.x" "node": "0.10.x"
}, },
"scripts": {
"build-assets": "gulp build"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/hypothesis/h.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