Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Commit 4dd8c1d

Browse files
committed
Webpack!
1 parent a01525d commit 4dd8c1d

33 files changed

+204
-84
lines changed

.babel_cache/.gitkeep

Whitespace-only changes.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ profiles.clj
2222
/resources/frontend_client/app/dist/
2323
/node_modules/
2424
/.js_hint_output/
25+
/.babel_cache

Gulpfile.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
var gulp = require('gulp'),
44
concat = require('gulp-concat'),
55
react = require('gulp-react'),
6-
myth = require('gulp-myth');
6+
myth = require('gulp-myth'),
7+
webpack = require('gulp-webpack');
78

89
var basePath = 'resources/frontend_client/app/';
910

1011
var SRC = {
1112
css: [basePath + 'css/**/*.css', basePath + 'components/**/*.css'],
1213
jsx: [basePath + 'query_builder/*.js'],
13-
appJS: [basePath + '**/*.js', '!' + basePath + 'bower_components/**/*.js', '!' + basePath + 'dist/*.js', '!' + basePath + 'query_builder/*.js', '!' + basePath + '/test/**/*.js']
14+
appJS: [basePath + '**/*.js', '!' + basePath + 'bower_components/**/*.js', '!' + basePath + 'dist/*.js', '!' + basePath + 'query_builder/*.js', '!' + basePath + '/test/**/*.js'],
15+
js: [basePath + '**/*.js', '!' + basePath + 'bower_components/**/*.js', '!' + basePath + 'dist/*.js', '!' + basePath + '/test/**/*.js']
1416
};
1517

1618
var DEST = {
@@ -60,3 +62,14 @@ gulp.task('watch', function(){
6062
gulp.task('build', ['css', 'jsx', 'build-js']);
6163

6264
gulp.task('default', ['build', 'watch']);
65+
66+
gulp.task("webpack", function() {
67+
return gulp.src(SRC.js)
68+
.pipe(webpack(require("./webpack.config")))
69+
.pipe(gulp.dest(DEST.js));
70+
});
71+
72+
gulp.task("webpack-watch", function() {
73+
gulp.watch(SRC.js, ["webpack"]);
74+
gulp.watch(SRC.css, ['css']);
75+
});

package.json

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
{
2-
"name": "corvus",
3-
"private": true,
4-
"version": "0.0.0",
5-
"description": "Expa Analytics",
6-
"repository": "https://github.com/expa/data",
7-
"license": "private",
8-
"engines": {
9-
"node": "0.10.25"
10-
},
11-
"dependencies": {
12-
"bower": "1.3.12",
13-
"gulp": "^3.8.8",
14-
"gulp-concat": "^2.4.0",
15-
"gulp-myth": "^1.0.1",
16-
"gulp-jsx": "^0.7.0",
17-
"gulp-react": "^2.0.0"
18-
},
19-
"devDependencies": {
20-
"http-server": "^0.6.1",
21-
"jsxhint": "0.13.3",
22-
"karma": "~0.10",
23-
"karma-junit-reporter": "^0.2.2",
24-
"protractor": "~0.20.1",
25-
"shelljs": "^0.2.6"
26-
},
27-
"scripts": {
28-
"postinstall": "./node_modules/bower/bin/bower install --allow-root --config.interactive=false"
29-
}
2+
"name": "corvus",
3+
"private": true,
4+
"version": "0.0.0",
5+
"description": "Expa Analytics",
6+
"repository": "https://github.com/expa/data",
7+
"license": "private",
8+
"engines": {
9+
"node": "0.10.25"
10+
},
11+
"dependencies": {
12+
"bower": "1.3.12",
13+
"gulp": "^3.8.8",
14+
"gulp-concat": "^2.4.0",
15+
"gulp-jsx": "^0.7.0",
16+
"gulp-myth": "^1.0.1",
17+
"gulp-react": "^2.0.0",
18+
"react": "^0.12.2"
19+
},
20+
"devDependencies": {
21+
"http-server": "^0.6.1",
22+
"jsxhint": "0.13.3",
23+
"karma": "~0.10",
24+
"karma-junit-reporter": "^0.2.2",
25+
"protractor": "~0.20.1",
26+
"shelljs": "^0.2.6"
27+
},
28+
"scripts": {
29+
"postinstall": "./node_modules/bower/bin/bower install --allow-root --config.interactive=false"
30+
}
3031
}

resources/frontend_client/app/card/card.charting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ function GeoHeatmapChartRenderer(id, card, result) {
565565
});
566566
}
567567

568-
var CardRenderer = {
568+
export var CardRenderer = {
569569
/// get the size render settings for card if applicable
570570
_getSizeSettings: function(cardOrDimension) {
571571
if (typeof cardOrDimension === "object") {

resources/frontend_client/app/card/card.controllers.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
2-
/*global _, document, confirm, QueryHeader, NativeQueryEditor, GuiQueryEditor, ResultQueryEditor, QueryVisualization*/
2+
/*global _, document, confirm*/
3+
4+
import GuiQueryEditor from '../query_builder/gui_query_editor.react';
5+
import NativeQueryEditor from '../query_builder/native_query_editor.react';
6+
import QueryHeader from '../query_builder/header.react';
7+
import QueryVisualization from '../query_builder/visualization.react';
38

49
// Card Controllers
510
var CardControllers = angular.module('corvus.card.controllers', []);

resources/frontend_client/app/query_builder/action_button.react.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
'use strict';
2-
/*global cx, setTimeout, clearTimeout, OnClickOutside, SelectionModule, Icon*/
2+
/*global setTimeout, clearTimeout, OnClickOutside*/
33

4-
var ActionButton = React.createClass({
4+
import Icon from './icon.react';
5+
6+
var cx = React.addons.classSet;
7+
8+
export default React.createClass({
59
displayName: 'ActionButton',
610
propTypes: {
711
actionFn: React.PropTypes.func.isRequired

resources/frontend_client/app/query_builder/add_to_dashboard.react.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
'use strict';
2-
/*global cx, OnClickOutside, Popover, AddToDashboardPopover, SelectionModule, Icon, ReactCSSTransitionGroup*/
2+
/*global OnClickOutside*/
33

4-
var AddToDashboard = React.createClass({
4+
import AddToDashboardPopover from './add_to_dashboard_popover.react';
5+
import Icon from './icon.react';
6+
import Popover from './popover.react';
7+
8+
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
9+
10+
export default React.createClass({
511
displayName: 'AddToDashboard',
612
propTypes: {
713
card: React.PropTypes.object.isRequired,

resources/frontend_client/app/query_builder/add_to_dashboard_popover.react.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
'use strict';
2-
/*global cx, ReactCSSTransitionGroup, OnClickOutside, FormField, SelectionModule, Icon */
2+
/*global OnClickOutside*/
33

4-
var AddToDashboardPopover = React.createClass({
4+
import FormField from './form_field.react';
5+
import Icon from './icon.react';
6+
7+
var cx = React.addons.classSet;
8+
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
9+
10+
export default React.createClass({
511
displayName: 'AddToDashboardPopover',
612
propTypes: {
713
card: React.PropTypes.object.isRequired,

resources/frontend_client/app/query_builder/aggregation_widget.react.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
'use strict';
2-
/*global _, DateFilter, SelectionModule, Icon */
2+
/*global _ */
33

4-
var AggregationWidget = React.createClass({
4+
import SelectionModule from './selection_module.react';
5+
6+
export default React.createClass({
57
displayName: 'AggregationWidget',
68
propTypes: {
79
aggregation: React.PropTypes.array.isRequired,

0 commit comments

Comments
 (0)