diff --git a/setupbase.py b/setupbase.py index 29d37314e..29ddc405e 100644 --- a/setupbase.py +++ b/setupbase.py @@ -118,7 +118,14 @@ def find_package_data(): # for verification purposes, explicitly add main.min.js # so that installation will fail if they are missing for app in ['auth', 'edit', 'notebook', 'terminal', 'tree']: - static_data.append(pjoin('static', app, 'js', 'built', 'main.min.js')) + static_data.extend([ + pjoin('static', app, 'js', 'built', '*main.min.js'), + pjoin('static', app, 'js', 'built', '*main.min.js.map'), + ]) + static_data.extend([ + pjoin('static', 'built', '*index.js'), + pjoin('static', 'built', '*index.js.map'), + ]) components = pjoin("static", "components") # select the components we actually need to install @@ -461,7 +468,7 @@ class CompileJS(Command): def build_main(self, name): """Build main.min.js""" - target = pjoin(static, name, 'js', 'build', 'main.min.js') + target = pjoin(static, name, 'js', 'built', 'main.min.js') if not self.should_run(name, target): log.info("%s up to date" % target) diff --git a/tools/build-main.js b/tools/build-main.js deleted file mode 100644 index 1ae0a64a1..000000000 --- a/tools/build-main.js +++ /dev/null @@ -1,67 +0,0 @@ -// build main.min.js -// spawned by gulp to allow parallelism - -var rjs = require('requirejs').optimize; - -var name = process.argv[2]; - -var rjs_config = { - name: name + '/js/main', - out: './notebook/static/' + name + '/js/main.min.js', - baseUrl: 'notebook/static', - preserveLicenseComments: false, // license comments conflict with sourcemap generation - generateSourceMaps: true, - optimize: "none", - paths: { - underscore : 'components/underscore/underscore-min', - backbone : 'components/backbone/backbone-min', - jquery: 'components/jquery/jquery.min', - bootstrap: 'components/bootstrap/js/bootstrap.min', - bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min', - "jquery-ui": 'components/jquery-ui/ui/minified/jquery-ui.min', - moment: 'components/moment/moment', - codemirror: 'components/codemirror', - termjs: 'components/term.js/src/term', - typeahead: 'components/jquery-typeahead/dist/jquery.typeahead', - contents: 'empty:' - }, - map: { // for backward compatibility - "*": { - "jqueryui": "jquery-ui", - } - }, - shim: { - typeahead: { - deps: ["jquery"], - exports: "typeahead" - }, - underscore: { - exports: '_' - }, - backbone: { - deps: ["underscore", "jquery"], - exports: "Backbone" - }, - bootstrap: { - deps: ["jquery"], - exports: "bootstrap" - }, - bootstraptour: { - deps: ["bootstrap"], - exports: "Tour" - }, - "jquery-ui": { - deps: ["jquery"], - exports: "$" - } - }, - - exclude: [ - "custom/custom", - ] -}; - -rjs(rjs_config, console.log, function (err) { - console.log("Failed to build", name, err); - process.exit(1); -}); diff --git a/webpack.config.js b/webpack.config.js index f2917de79..5cd26708d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -44,7 +44,7 @@ function buildConfig(appName) { path: './notebook/static/' + appName + '/js/built', publicPath: "/static/" + appName + "/js/built/" }, - devtool: 'source-map' + devtool: 'source-map', }); } @@ -61,6 +61,7 @@ module.exports = [ path: './notebook/static/services/built', libraryTarget: 'amd' }, + devtool: 'source-map', }), _.extend({}, commonConfig, { entry: './notebook/static/index.js', @@ -70,5 +71,6 @@ module.exports = [ libraryTarget: 'amd', publicPath: "/static/built/" }, + devtool: 'source-map', }), ].map(x => buildConfig(x));