Skip to content

Commit

Permalink
WORKING: using ProvidePlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
1ambda committed Dec 28, 2016
1 parent ed04f4e commit 71de16f
Show file tree
Hide file tree
Showing 9 changed files with 406 additions and 60 deletions.
5 changes: 5 additions & 0 deletions zeppelin-web/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

"plugins": ["transform-object-rest-spread"],
"presets": ["es2015"]
}
37 changes: 29 additions & 8 deletions zeppelin-web/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,6 @@ module.exports = function(grunt) {
middleware: function(connect) {
return [
connect.static('.tmp'),
connect().use(
'/bower_components',
connect.static('./bower_components')
),
];
}
}
Expand All @@ -220,10 +216,6 @@ module.exports = function(grunt) {
return [
connect.static('.tmp'),
connect.static('test'),
connect().use(
'/bower_components',
connect.static('./bower_components')
),
connect.static(appConfig.app)
];
}
Expand Down Expand Up @@ -429,6 +421,26 @@ module.exports = function(grunt) {

// Copies remaining files to places other tasks can use
copy: {
webpack: {
files: [
{
expand: true,
cwd: 'bower_components',
src: ['**/*'],
dest: '.tmp/bower_components',
},
{
expand: true,
cwd: '<%= yeoman.app %>',
src: [
'app/tabledata/**/*.html',
'app/tabledata/**/*.js',
'app/visualization/**/*.html',
'app/visualization/**/*.js',
],
dest: '.tmp',
}]
},
dev: {
files: [{
expand: true,
Expand Down Expand Up @@ -587,6 +599,15 @@ module.exports = function(grunt) {
}
});

grunt.registerTask('webpack', 'Prepare webpack build', function(target) {
grunt.task.run([
// 'clean:server',
'copy:webpack',
// 'copy:dev',
// 'postcss',
]);
});

grunt.registerTask('serve', 'Compile then start a connect web server', function(target) {
if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']);
Expand Down
27 changes: 20 additions & 7 deletions zeppelin-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"name": "zeppelin-web",
"license": "Apache-2.0",
"version": "0.0.0",
"engines" : { "node" : ">=6.0.0" },
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"postinstall": "bower install --silent && grunt googlefonts",
"build": "grunt build",
"webpack": "grunt webpack && webpack-dev-server --port 9000 --history-api-fallback --inline --progress",
"start": "grunt serve",
"test": "grunt test",
"pretest": "npm install karma-phantomjs-launcher"
Expand All @@ -15,10 +18,17 @@
"grunt-dom-munger": "^3.4.0"
},
"devDependencies": {
"autoprefixer": "^6.1.0",
"bower": "^1.8.0",
"autoprefixer": "^6.5.4",
"babel-cli": "^6.18.0",
"babel-core": "^6.21.0",
"babel-loader": "^6.2.10",
"babel-plugin-transform-object-rest-spread": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"bower": "^1.8.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"grunt": "^0.4.1",
"grunt-babel": "^6.0.0",
"grunt-cache-bust": "1.3.0",
Expand All @@ -44,15 +54,18 @@
"grunt-svgmin": "^0.4.0",
"grunt-usemin": "^2.1.1",
"grunt-wiredep": "~2.0.0",
"html-webpack-plugin": "^2.24.1",
"jasmine-core": "^2.5.2",
"karma": "~1.3.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "~1.0.2",
"load-grunt-tasks": "^0.4.0",
"time-grunt": "^0.3.1"
},
"engines": {
"node": ">=0.10.0"
"postcss-loader": "^1.2.1",
"raw-loader": "^0.5.1",
"style-loader": "^0.13.1",
"time-grunt": "^0.3.1",
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2"
},
"repository": {
"type": "git",
Expand Down
1 change: 0 additions & 1 deletion zeppelin-web/src/app/tabledata/pivot.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,3 @@ zeppelin.PivotTransformation.prototype.pivot = function(data, keys, groups, valu
rows: rows
};
};

19 changes: 19 additions & 0 deletions zeppelin-web/src/app/zeppelin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

var zeppelin = {};

export default zeppelin;
49 changes: 49 additions & 0 deletions zeppelin-web/src/fonts/google-fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@font-face {
font-family: 'Patua One';
font-style: normal;
font-weight: 400;
src: url(../fonts/patua-one-400-normal.eot);
src: local('Patua One'), local('PatuaOne-Regular'), url(../fonts/patua-one-400-normal.woff) format('woff'), url(../fonts/patua-one-400-normal.ttf) format('truetype'), url(../fonts/patua-one-400-normal.svg#PatuaOne) format('svg');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 300;
src: url(../fonts/source-code-pro-300-normal.eot);
src: local('Source Code Pro Light'), local('SourceCodePro-Light'), url(../fonts/source-code-pro-300-normal.woff) format('woff'), url(../fonts/source-code-pro-300-normal.ttf) format('truetype'), url(../fonts/source-code-pro-300-normal.svg#SourceCode Pro) format('svg');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 400;
src: url(../fonts/source-code-pro-400-normal.eot);
src: local('Source Code Pro'), local('SourceCodePro-Regular'), url(../fonts/source-code-pro-400-normal.woff) format('woff'), url(../fonts/source-code-pro-400-normal.ttf) format('truetype'), url(../fonts/source-code-pro-400-normal.svg#SourceCode Pro) format('svg');
}
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 500;
src: url(../fonts/source-code-pro-500-normal.eot);
src: local('Source Code Pro Medium'), local('SourceCodePro-Medium'), url(../fonts/source-code-pro-500-normal.woff) format('woff'), url(../fonts/source-code-pro-500-normal.ttf) format('truetype'), url(../fonts/source-code-pro-500-normal.svg#SourceCode Pro) format('svg');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: url(../fonts/roboto-300-normal.eot);
src: local('Roboto Light'), local('Roboto-Light'), url(../fonts/roboto-300-normal.woff) format('woff'), url(../fonts/roboto-300-normal.ttf) format('truetype'), url(../fonts/roboto-300-normal.svg#Roboto) format('svg');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url(../fonts/roboto-400-normal.eot);
src: local('Roboto'), local('Roboto-Regular'), url(../fonts/roboto-400-normal.woff) format('woff'), url(../fonts/roboto-400-normal.ttf) format('truetype'), url(../fonts/roboto-400-normal.svg#Roboto) format('svg');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: url(../fonts/roboto-500-normal.eot);
src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/roboto-500-normal.woff) format('woff'), url(../fonts/roboto-500-normal.ttf) format('truetype'), url(../fonts/roboto-500-normal.svg#Roboto) format('svg');
}
44 changes: 0 additions & 44 deletions zeppelin-web/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,9 @@
<!-- endbower -->
<!-- endbuild -->
<!-- build:js({.tmp,src}) scripts/scripts.js -->
<script src="app/app.js"></script>
<script src="app/app.controller.js"></script>
<script src="app/home/home.controller.js"></script>
<script src="app/tabledata/tabledata.js"></script>
<script src="app/tabledata/transformation.js"></script>
<script src="app/tabledata/pivot.js"></script>
<script src="app/handsontable/handsonHelper.js"></script>
<script src="app/tabledata/passthrough.js"></script>
<script src="app/tabledata/columnselector.js"></script>
<script src="app/visualization/visualization.js"></script>
Expand All @@ -185,46 +181,6 @@
<script src="app/visualization/builtins/visualization-areachart.js"></script>
<script src="app/visualization/builtins/visualization-linechart.js"></script>
<script src="app/visualization/builtins/visualization-scatterchart.js"></script>
<script src="app/notebook/notebook.controller.js"></script>
<script src="app/jobmanager/jobmanager.controller.js"></script>
<script src="app/jobmanager/jobs/job.controller.js"></script>
<script src="app/jobmanager/jobmanager.filter.js"></script>
<script src="app/interpreter/interpreter.controller.js"></script>
<script src="app/interpreter/interpreter.filter.js"></script>
<script src="app/credential/credential.controller.js"></script>
<script src="app/configuration/configuration.controller.js"></script>
<script src="app/notebook/paragraph/paragraph.controller.js"></script>
<script src="app/notebook/paragraph/result/result.controller.js"></script>
<script src="app/search/result-list.controller.js"></script>
<script src="app/notebookRepos/notebookRepos.controller.js"></script>
<script src="components/arrayOrderingSrv/arrayOrdering.service.js"></script>
<script src="components/clipboard/clipboard.controller.js"></script>
<script src="components/navbar/navbar.controller.js"></script>
<script src="components/ngescape/ngescape.directive.js"></script>
<script src="components/interpreter/interpreter.directive.js"></script>
<script src="components/expandCollapse/expandCollapse.directive.js"></script>
<script src="components/noteName-create/notename.controller.js"></script>
<script src="components/noteName-import/notenameImport.controller.js"></script>
<script src="components/popover-html-unsafe/popover-html-unsafe.directive.js"></script>
<script src="components/popover-html-unsafe/popover-html-unsafe-popup.directive.js"></script>
<script src="components/editor/codeEditor.directive.js"></script>
<script src="components/ngenter/ngenter.directive.js"></script>
<script src="components/dropdowninput/dropdowninput.directive.js"></script>
<script src="components/resizable/resizable.directive.js"></script>
<script src="components/noteName-create/visible.directive.js"></script>
<script src="components/websocketEvents/websocketMsg.service.js"></script>
<script src="components/websocketEvents/websocketEvents.factory.js"></script>
<script src="components/noteListDataFactory/noteList.datafactory.js"></script>
<script src="components/baseUrl/baseUrl.service.js"></script>
<script src="components/browser-detect/browserDetect.service.js"></script>
<script src="components/saveAs/saveAs.service.js"></script>
<script src="components/searchService/search.service.js"></script>
<script src="components/login/login.controller.js"></script>
<script src="components/elasticInputCtrl/elasticInput.controller.js"></script>
<script src="components/noteAction/noteAction.service.js"></script>
<script src="components/notevarshareService/notevarshare.service.js"></script>
<script src="components/rename/rename.controller.js"></script>
<script src="components/rename/rename.service.js"></script>
<!-- endbuild -->
</body>
</html>
44 changes: 44 additions & 0 deletions zeppelin-web/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import './app/app.js';
import './app/app.controller.js';
import './app/home/home.controller.js';
import './app/handsontable/handsonHelper.js';
import './app/notebook/notebook.controller.js';
import './app/jobmanager/jobmanager.controller.js';
import './app/jobmanager/jobs/job.controller.js';
import './app/jobmanager/jobmanager.filter.js';
import './app/interpreter/interpreter.controller.js';
import './app/interpreter/interpreter.filter.js';
import './app/credential/credential.controller.js';
import './app/configuration/configuration.controller.js';
import './app/notebook/paragraph/paragraph.controller.js';
import './app/notebook/paragraph/result/result.controller.js';
import './app/search/result-list.controller.js';
import './app/notebookRepos/notebookRepos.controller.js';
import './components/arrayOrderingSrv/arrayOrdering.service.js';
import './components/clipboard/clipboard.controller.js';
import './components/navbar/navbar.controller.js';
import './components/ngescape/ngescape.directive.js';
import './components/interpreter/interpreter.directive.js';
import './components/expandCollapse/expandCollapse.directive.js';
import './components/noteName-create/notename.controller.js';
import './components/noteName-import/notenameImport.controller.js';
import './components/popover-html-unsafe/popover-html-unsafe.directive.js';
import './components/popover-html-unsafe/popover-html-unsafe-popup.directive.js';
import './components/editor/codeEditor.directive.js';
import './components/ngenter/ngenter.directive.js';
import './components/dropdowninput/dropdowninput.directive.js';
import './components/resizable/resizable.directive.js';
import './components/noteName-create/visible.directive.js';
import './components/websocketEvents/websocketMsg.service.js';
import './components/websocketEvents/websocketEvents.factory.js';
import './components/noteListDataFactory/noteList.datafactory.js';
import './components/baseUrl/baseUrl.service.js';
import './components/browser-detect/browserDetect.service.js';
import './components/saveAs/saveAs.service.js';
import './components/searchService/search.service.js';
import './components/login/login.controller.js';
import './components/elasticInputCtrl/elasticInput.controller.js';
import './components/noteAction/noteAction.service.js';
import './components/notevarshareService/notevarshare.service.js';
import './components/rename/rename.controller.js';
import './components/rename/rename.service.js';

0 comments on commit 71de16f

Please sign in to comment.