Skip to content

Commit e33a275

Browse files
committed
Merge pull request #337 from ScottLogic/dev
Merge dev into master
2 parents 4ad0e9a + d017149 commit e33a275

61 files changed

Lines changed: 1729 additions & 1023 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015"]
3+
}

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"ecmaFeatures": {
66
"modules": true
77
},
8+
"parser": "babel-eslint",
89
"rules": {
910
"comma-dangle": 2,
1011
"no-cond-assign": 2,

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# These files are text and should be normalized (convert crlf -> lf)
2+
*.js text
3+
*.md text
4+
*.css text
5+
*.html text
6+
*.json text
7+
*.less text

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
public
33
.idea
4+
.grunt

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# OpenFinD3FC
1+
# BitFlux-OpenFin
22

33
Using OpenFin this will be a locally hosted financial charting application, pulling data from [Quandl](https://www.quandl.com/) and viewing it using the [d3fc-showcase](http://scottlogic.github.io/d3fc-showcase/).
44

5-
You can download the OpenFin demo from [here](http://owennw.github.io/OpenFinD3FC/OpenFinD3FC.zip).
5+
You can download the OpenFin demo from [here](http://scottlogic.github.io/bitflux-openfin/bitflux-openfin.zip).
66

77
## Developing
88

gruntfile.js

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
11
/* jshint node: true*/
22
'use strict';
33
module.exports = function(grunt) {
4-
var target = grunt.option('target') || 'http://owennw.github.io/OpenFinD3FC',
5-
port = process.env.PORT || 5000,
6-
files = {
7-
js: [
8-
'gruntfile.js',
9-
'src/**/*.js',
10-
'src/**/*.json',
11-
'*.json'
12-
],
13-
html: [
14-
'src/**/*.html'
15-
],
16-
css: [
17-
'src/**/*.css',
18-
'src/**/*.less'
19-
],
20-
showcase: [
21-
'node_modules/d3fc-showcase/dist/'
22-
]
23-
};
4+
var target = grunt.option('target') || 'http://scottlogic.github.io/bitflux-openfin',
5+
port = process.env.PORT || 5000;
246

257
grunt.initConfig({
268
'gh-pages': {
@@ -35,7 +17,7 @@ module.exports = function(grunt) {
3517
options: {
3618
base: 'public',
3719
message: 'Deploy to GitHub Pages',
38-
repo: 'https://github.com/owennw/OpenFinD3FC.git'
20+
repo: 'https://github.com/ScottLogic/bitflux-openfin.git'
3921
},
4022
src: ['**/*']
4123
}
@@ -64,7 +46,7 @@ module.exports = function(grunt) {
6446
filePath: 'public/app.json',
6547
options: {
6648
startup_app: {
67-
url: target + '/index.html',
49+
url: target + '/parent.html',
6850
applicationIcon: target + '/favicon.ico'
6951
},
7052
shortcut: {
@@ -106,8 +88,8 @@ module.exports = function(grunt) {
10688

10789
download: {
10890
openfinZip: {
109-
src: ['https://dl.openfin.co/services/download?fileName=OpenFinD3FC&config=http://owennw.github.io/OpenFinD3FC/app.json'],
110-
dest: './public/OpenFinD3FC.zip'
91+
src: ['https://dl.openfin.co/services/download?fileName=bitflux-openfin&config=http://scottlogic.github.io/bitflux-openfin/app.json'],
92+
dest: './public/bitflux-openfin.zip'
11193
}
11294
},
11395

@@ -166,10 +148,10 @@ module.exports = function(grunt) {
166148
src: ['**/*.html'],
167149
dest: 'public'
168150
},
169-
js: {
151+
json: {
170152
expand: true,
171153
cwd: 'src/',
172-
src: ['**/*.js', '**/*.json'],
154+
src: ['**/*.json'],
173155
dest: 'public'
174156
},
175157
icons: {
@@ -186,6 +168,35 @@ module.exports = function(grunt) {
186168
dest: 'public/assets/fonts'
187169
}]
188170
}
171+
},
172+
concat: {
173+
dist: {
174+
src: ['src/**/*.js'],
175+
dest: 'public/app.js'
176+
},
177+
parent: {
178+
src: ['src/parentApp.js', 'src/parent-controller.js', 'src/store-service.js', 'src/window-service.js'],
179+
dest: 'public/app-parent.js'
180+
}
181+
},
182+
183+
uglify: {
184+
dist: {
185+
files: {
186+
'public/app.js': ['public/app.js']
187+
}
188+
}
189+
},
190+
babel: {
191+
options: {
192+
sourceMap: false
193+
},
194+
dist: {
195+
files: {
196+
'public/app.js': 'public/app.js',
197+
'public/app-parent.js': 'public/app-parent.js'
198+
}
199+
}
189200
}
190201
});
191202

@@ -200,7 +211,10 @@ module.exports = function(grunt) {
200211
grunt.loadNpmTasks('grunt-contrib-less');
201212
grunt.loadNpmTasks('grunt-eslint');
202213
grunt.loadNpmTasks('grunt-http-download');
214+
grunt.loadNpmTasks('grunt-contrib-concat');
215+
grunt.loadNpmTasks('grunt-contrib-uglify');
203216
grunt.loadNpmTasks('grunt-gh-pages');
217+
grunt.loadNpmTasks('grunt-babel');
204218

205219
grunt.registerTask('showcase', function() {
206220
var callback = this.async();
@@ -216,10 +230,11 @@ module.exports = function(grunt) {
216230
});
217231
});
218232

219-
grunt.registerTask('build', ['eslint', 'clean', 'showcase', 'copy', 'less:development', 'connect:livereload']);
233+
grunt.registerTask('build', ['eslint', 'clean', 'showcase', 'copy', 'concat', 'babel', 'less:development', 'connect:livereload']);
234+
grunt.registerTask('build:uglify', ['build', 'uglify']);
220235
grunt.registerTask('serve', ['build', 'openfin:serve']);
221-
grunt.registerTask('createZip', ['build', 'download']);
222-
grunt.registerTask('ci', ['build', 'download']);
236+
grunt.registerTask('createZip', ['build:uglify', 'download']);
237+
grunt.registerTask('ci', ['build:uglify', 'download']);
223238
grunt.registerTask('deploy', ['ci', 'gh-pages:origin']);
224239
grunt.registerTask('deploy:upstream', ['ci', 'gh-pages:upstream']);
225240
grunt.registerTask('default', ['serve']);

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
{
2-
"name": "OpenFinD3FC",
2+
"name": "bitflux-openfin",
33
"version": "0.0.0",
44
"scripts": {
55
"test": "grunt ci",
66
"postinstall": "cd node_modules/d3fc-showcase && npm i"
77
},
88
"devDependencies": {
9+
"babel-eslint": "^4.1.8",
10+
"babel-preset-es2015": "^6.3.13",
911
"connect-livereload": "^0.4.0",
1012
"grunt": "^0.4.5",
13+
"grunt-babel": "^6.0.0",
1114
"grunt-cli": "^0.1.13",
1215
"grunt-contrib-clean": "^0.7.0",
16+
"grunt-contrib-concat": "^0.5.1",
1317
"grunt-contrib-connect": "^0.8.0",
1418
"grunt-contrib-copy": "^0.8.2",
1519
"grunt-contrib-jshint": "^0.10.0",
1620
"grunt-contrib-less": "^1.1.0",
21+
"grunt-contrib-uglify": "^0.11.1",
1722
"grunt-eslint": "^17.3.1",
1823
"grunt-gh-pages": "^1.0.0",
1924
"grunt-http-download": "^0.1.0",
@@ -25,7 +30,6 @@
2530
"angular": "^1.4.8",
2631
"angular-animate": "^1.4.8",
2732
"angular-resource": "^1.4.8",
28-
"angular-storage": "0.0.13",
2933
"d3fc": "^5.2.0",
3034
"d3fc-showcase": "ScottLogic/BitFlux#56dc4387d334e105678e88c6941f492118485f6a",
3135
"jquery": "^1.11.1",

src/.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"d3": true,
1010
"fc": true,
1111
"document": true,
12-
"confirm": true
12+
"confirm": true,
13+
"Event": true,
14+
"localStorage": true
1315
}
1416
}

src/app.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,35 @@
33

44
angular.module('OpenFinD3FC', [
55
'ngAnimate',
6+
'openfin.parent',
7+
'openfin.main',
68
'openfin.showcase',
79
'openfin.toolbar',
10+
'openfin.icon',
811
'openfin.search',
912
'openfin.favourites',
1013
'openfin.sidebar',
1114
'openfin.filters',
1215
'openfin.star',
1316
'openfin.tearout',
14-
'openfin.minichart'
17+
'openfin.minichart',
18+
'openfin.scroll'
1519
]);
20+
21+
angular.module('openfin.main', ['openfin.currentWindow']);
22+
angular.module('openfin.showcase', ['openfin.selection', 'openfin.quandl']);
23+
angular.module('openfin.toolbar', ['openfin.currentWindow']);
24+
angular.module('openfin.icon', []);
25+
angular.module('openfin.search', ['openfin.quandl', 'openfin.selection', 'openfin.currentWindow']);
26+
angular.module('openfin.favourites', ['openfin.quandl', 'openfin.selection', 'openfin.currentWindow']);
27+
angular.module('openfin.sidebar', []);
28+
angular.module('openfin.filters', []);
29+
angular.module('openfin.star', ['openfin.selection']);
30+
angular.module('openfin.tearout', ['openfin.geometry', 'openfin.hover', 'openfin.currentWindow']);
31+
angular.module('openfin.minichart', ['openfin.quandl']);
32+
angular.module('openfin.store', []);
33+
angular.module('openfin.parent', ['openfin.window']);
34+
angular.module('openfin.currentWindow', []);
35+
angular.module('openfin.window', []);
36+
angular.module('openfin.scroll', []);
1637
}());

src/app.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,21 @@
22
"devtools_port": 9090,
33
"startup_app": {
44
"name": "OpenFinD3FC",
5-
"url": "http://owennw.github.io/OpenFinD3FC/index.html",
65
"uuid": "OpenFinD3FC",
7-
"applicationIcon": "http://owennw.github.io/OpenFinD3FC/favicon.ico",
8-
"autoShow": true,
9-
"minWidth": 918,
10-
"minHeight": 510,
11-
"defaultWidth": 1280,
12-
"defaultHeight": 720,
13-
"frame": false
6+
"maxWidth": 0,
7+
"maxHeight": 0,
8+
"defaultWidth": 0,
9+
"defaultHeight": 0,
10+
"frame": false,
11+
"showTaskbarIcon": false
1412
},
1513
"runtime": {
1614
"arguments": "",
1715
"version": "stable"
1816
},
1917
"shortcut": {
2018
"company": "OpenFin",
21-
"description": "Hosts the d3fc-showcase as an OpenFin application.",
22-
"icon": "http://owennw.github.io/OpenFinD3FC/favicon.ico",
19+
"description": "Hosts BitFlux as an OpenFin application.",
2320
"name": "OpenFinD3FC"
2421
}
2522
}

0 commit comments

Comments
 (0)