Skip to content
Snippets Groups Projects
Commit 7906cb06 authored by Kyle Doherty's avatar Kyle Doherty
Browse files

Merge pull request #212 from metabase/concat_js

concat non vendor and test js into one file
parents 24d1aedc 6b5dcdc1
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,8 @@ var basePath = 'resources/frontend_client/app/';
var SRC = {
css: [basePath + 'css/**/*.css', basePath + 'components/**/*.css'],
jsx: [basePath + 'query_builder/*.js']
jsx: [basePath + 'query_builder/*.js'],
appJS: [basePath + '**/*.js', '!' + basePath + 'bower_components/**/*.js', '!' + basePath + 'dist/*.js', '!' + basePath + 'query_builder/*.js', '!' + basePath + '/test/**/*.js']
};
var DEST = {
......@@ -41,16 +42,21 @@ gulp.task('jsx', function () {
return gulp.src(SRC.jsx)
.pipe(concat('query_builder.js'))
.pipe(react())
.pipe(gulp.dest(DEST.js))
})
.pipe(gulp.dest(DEST.js));
});
gulp.task('build-js', function () {
return gulp.src(SRC.appJS)
.pipe(concat('app.js'))
.pipe(gulp.dest(DEST.js));
});
gulp.task('watch', function(){
gulp.watch(SRC.css, ['css']);
gulp.watch(SRC.jsx, ['jsx']);
gulp.watch(SRC.appJS, ['build-js']);
});
gulp.task('build', ['css', 'jsx', 'build-js']);
gulp.task('build', ['css', 'jsx']);
gulp.task('default', ['build','watch', 'jsx']);
gulp.task('default', ['build', 'watch']);
......@@ -165,16 +165,16 @@
<!-- JS INCLUDES -->
<script src="/app/bower_components/react/react-with-addons.js"></script>
<script src="/app/bower_components/react-onclickoutside/index.js"></script>
<script src="/app/bower_components/moment/min/moment.min.js"></script>
<script src="/app/bower_components/tether/tether.min.js"></script>
<script src="/app/bower_components/react-date-picker/react-datepicker.js"></script>
<!-- vendor js -->
<script src="/app/bower_components/react/react-with-addons.min.js"></script>
<script src="/app/bower_components/react-onclickoutside/index.js"></script>
<script src="/app/bower_components/moment/min/moment.min.js"></script>
<script src="/app/bower_components/tether/tether.min.js"></script>
<script src="/app/bower_components/react-date-picker/react-datepicker.js"></script>
<script src="/app/dist/query_builder.js" type="text/javascript"></script>
<script src="/app/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/app/bower_components/underscore/underscore.js"></script>
<script src="/app/bower_components/underscore/underscore-min.js"></script>
<script src="/app/bower_components/fastclick/lib/fastclick.js"></script>
<script src="/app/bower_components/angular-route/angular-route.min.js"></script>
......@@ -182,16 +182,16 @@
<script src="/app/bower_components/angular-cookies/angular-cookies.min.js"></script>
<script src="/app/bower_components/angular-animate/angular-animate.min.js"></script>
<script src="/app/bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="/app/bower_components/angular-xeditable/dist/js/xeditable.js"></script>
<script src="/app/bower_components/angular-xeditable/dist/js/xeditable.min.js"></script>
<script src="/app/bower_components/angular-cookie/angular-cookie.min.js"></script>
<script src="/app/bower_components/javascript-detect-element-resize/detect-element-resize.js"></script>
<script src="/app/bower_components/angular-gridster/src/angular-gridster.js"></script>
<script src="/app/bower_components/angular-gridster/dist/angular-gridster.min.js"></script>
<script src="/app/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="/app/bower_components/angular-http-auth/src/http-auth-interceptor.js"></script>
<script src="/app/bower_components/ace-builds/src-min-noconflict/ace.js"></script>
<script src="/app/bower_components/ace-builds/src-min-noconflict/mode-sql.js"></script>
<script src="/app/bower_components/ace-builds/src-min-noconflict/ext-language_tools.js"></script>
<script src="/app/bower_components/angular-ui-ace/ui-ace.js"></script>
<script src="/app/bower_components/angular-ui-ace/ui-ace.min.js"></script>
<script src="/app/bower_components/angularytics/dist/angularytics.min.js"></script>
<script src="/app/bower_components/ng-sortable/dist/ng-sortable.min.js"></script>
<script src="/app/bower_components/angular-readable-time/angular-readable-time.min.js"></script>
......@@ -202,83 +202,9 @@
<script src="/app/js/google_maps.js"></script>
<!-- global app -->
<script src="/app/app.js"></script>
<script src="/app/services.js"></script>
<script src="/app/controllers.js"></script>
<script src="/app/filters.js"></script>
<script src="/app/directives.js"></script>
<script src="/app/auth/auth.module.js"></script>
<script src="/app/auth/auth.controllers.js"></script>
<!-- components and shared bits -->
<script src="/app/annotation/annotation.services.js"></script>
<script src="/app/annotation/annotation.directives.js"></script>
<script src="/app/metabase/metabase.services.js"></script>
<script src="/app/components/components.module.js"></script>
<script src="/app/components/core_nav/core_nav.js"></script>
<script src="/app/components/workspace/workspace.js"></script>
<script src="/app/components/icons/icons.js"></script>
<!-- superadmin section -->
<script src="/app/superadmin/index/index.module.js"></script>
<script src="/app/superadmin/index/index.controllers.js"></script>
<script src="/app/superadmin/index/index.services.js"></script>
<script src="/app/superadmin/organization/organization.module.js"></script>
<script src="/app/superadmin/organization/organization.controllers.js"></script>
<!-- admin section -->
<script src="/app/admin/admin.controllers.js"></script>
<script src="/app/admin/databases/databases.module.js"></script>
<script src="/app/admin/databases/databases.controllers.js"></script>
<script src="/app/admin/datasets/datasets.module.js"></script>
<script src="/app/admin/datasets/datasets.controllers.js"></script>
<script src="/app/admin/datasets/datasets.directives.js"></script>
<script src="/app/admin/emailreport/emailreport.module.js"></script>
<script src="/app/admin/emailreport/emailreport.controllers.js"></script>
<script src="/app/admin/emailreport/emailreport.services.js"></script>
<script src="/app/admin/people/people.module.js"></script>
<script src="/app/admin/people/people.controllers.js"></script>
<script src="/app/admin/people/people.directives.js"></script>
<script src="/app/admin/query/query.module.js"></script>
<script src="/app/admin/query/query.controllers.js"></script>
<script src="/app/admin/query/query.services.js"></script>
<script src="/app/admin/annotation/annotation.module.js"></script>
<script src="/app/admin/annotation/annotation.controllers.js"></script>
<script src="/app/admin/search/search.module.js"></script>
<script src="/app/admin/search/search.controllers.js"></script>
<!-- main app -->
<script src="/app/card/card.module.js"></script>
<script src="/app/card/card.controllers.js"></script>
<script src="/app/card/card.services.js"></script>
<script src="/app/card/card.directives.js"></script>
<script src="/app/card/card.charting.js"></script>
<script src="/app/dashboard/dashboard.module.js"></script>
<script src="/app/dashboard/dashboard.controllers.js"></script>
<script src="/app/dashboard/dashboard.services.js"></script>
<script src="/app/dashboard/dashboard.directives.js"></script>
<script src="/app/explore/explore.module.js"></script>
<script src="/app/explore/explore.controllers.js"></script>
<script src="/app/explore/explore.directives.js"></script>
<script src="/app/explore/explore.services.js"></script>
<script src="/app/user/user.module.js"></script>
<script src="/app/user/user.controllers.js"></script>
<script src="/app/user/user.directives.js"></script>
<script src="/app/search/search.module.js"></script>
<script src="/app/search/search.controllers.js"></script>
<script src="/app/search/search.services.js"></script>
<!-- custom shtuff: be wary -->
<script src="/app/operator/operator.module.js"></script>
<script src="/app/operator/operator.controllers.js"></script>
<script src="/app/operator/operator.services.js"></script>
<script src="/app/reserve/reserve.module.js"></script>
<script src="/app/reserve/reserve.controllers.js"></script>
<script src="/app/reserve/reserve.services.js"></script>
<!-- dist app -->
<script src="/app/dist/app.js"></script>
<script src="/app/dist/query_builder.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js"></script>
<script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment