allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [10/50] [abbrv] allura git commit: [#7919] add tooltipster to navbar.js output file; Explicitly list es6.js files needed, don't share the main broccoli output tree so future es6 files aren't needlessly included
Date Fri, 08 Jan 2016 19:30:15 GMT
[#7919] add tooltipster to navbar.js output file; Explicitly list es6.js files needed, don't
share the main broccoli output tree so future es6 files aren't needlessly included


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/744d528a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/744d528a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/744d528a

Branch: refs/heads/master
Commit: 744d528acc0020747224cf52d809503bd2825e9e
Parents: 2823e7f
Author: Dave Brondsema <dave@brondsema.net>
Authored: Mon Dec 7 16:47:55 2015 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Fri Jan 8 14:06:15 2016 -0500

----------------------------------------------------------------------
 Brocfile.js | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/744d528a/Brocfile.js
----------------------------------------------------------------------
diff --git a/Brocfile.js b/Brocfile.js
index 38f82e8..72969b6 100644
--- a/Brocfile.js
+++ b/Brocfile.js
@@ -29,15 +29,18 @@ var tree = funnel('Allura/allura/public/nf/js', {
     include: ['*.es6.js'],
 });
 tree = babelTranspiler(tree, {
-    browserPolyfill: true,
     //filterExtensions:['es6.js'],
-    sourceMaps: 'inline',  // external doesn't work, have to use extract below
+    sourceMaps: 'inline',  // external doesn't work, but sourceMapConcat will extract them
     comments: false,
 });
+tree = sourceMapConcat(tree, {
+    inputFiles: ['**/*'],
+    outputFile: '/transpiled.js'
+});
 
 /* exactly what's needed for the navbar, so separate apps may use it too */
 var react_file = 'public/nf/js/react-with-addons' + (production ? '.min' : '') + '.js';
-var navbar_deps = funnel('Allura/allura', {
+var navbar = funnel('Allura/allura', {
     include: ['public/nf/js/underscore-min.js',
               react_file,
               'public/nf/js/react-dom.js',
@@ -45,22 +48,26 @@ var navbar_deps = funnel('Allura/allura', {
               'public/nf/js/react-reorderable.min.js',
               'lib/widgets/resources/js/jquery.lightbox_me.js',
               'public/nf/js/admin_modal.js',
+              'public/nf/js/jquery.tooltipster.js',
+              'public/nf/js/navbar.es6.js',
+              'public/nf/js/context-menu.es6.js',
+              'public/nf/js/tooltip.es6.js'
     ],
 });
-navbar = mergeTrees([navbar_deps, tree]);
-navbar = sourceMapConcat(navbar, {
+navbar = babelTranspiler(navbar, {
+    filterExtensions:['es6.js'],
+    sourceMaps: 'inline',  // external doesn't work, but sourceMapConcat will extract them
+    comments: false,
+});
+var navbar = sourceMapConcat(navbar, {
     // headerFiles & footerFiles used to specify some that must come before or after
others
     headerFiles: [react_file],
     inputFiles: ['**/*.js'],
-    footerFiles: ['navbar.es6.js',],
+    footerFiles: ['public/nf/js/navbar.js',], // this used to be navbar.es6.js but the babel
transpiler dropped the .es6
     outputFile: '/navbar.js',
 });
 
-tree = sourceMapConcat(tree, {
-    inputFiles: ['**/*'],
-    outputFile: '/transpiled.js'
-});
-
+// output both
 var output = mergeTrees([tree, navbar]);
 
 if (production) {


Mime
View raw message