Skip to content

Commit

Permalink
Lazy loaded widgets (#1665)
Browse files Browse the repository at this point in the history
* Added lazy-loading capability to the application (for widgets/plugins)
* Moved all navigation to navigator.js
* Simplified router.js
* Removed extra check for a bibcode when displaying an abstract
* Made all page managers, navigators expect/work with async events
* Optimized bundle for building smaller app
  • Loading branch information
romanchyla authored Jan 18, 2019
1 parent 90fe2ae commit 079362b
Show file tree
Hide file tree
Showing 49 changed files with 2,368 additions and 16,070 deletions.
26 changes: 1 addition & 25 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
{
"plugins": [
"transform-react-jsx",
["transform-object-rest-spread", { "useBuiltIns": true }],
"transform-object-assign"
],
"presets": [
[
"env",
{
"targets": {
"browsers": [
"last 2 versions",
"ios_saf >= 8",
"not IE <= 10",
"chrome >= 49",
"firefox >= 49",
"> 1%"
]
},
"debug": false,
"loose": true,
"modules": false,
"useBuiltIns": true
}
],
"react"
"@babel/react"
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ src/styles/css
.vagrant

src/discovery.vars.js
grunt/requirejs.js
.*
!.babelrc
!.travis.yml
Expand Down
27 changes: 16 additions & 11 deletions grunt/aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,21 @@ release:
tasks:
- 'env:prod'
- 'assets'
- 'clean:release'
- 'copy:release'
# - 'clean:release'
# - 'copy:release'
- 'compile-handlebars:index'
- 'exec:git_describe'
- 'string-replace:dist'
- 'babel:release'
- 'requirejs:release_concatenated'
- 'uglify:release'
- 'requirejs:release_css'
- 'concurrent:hash_require'
- 'copy:keep_original'
- 'copy:bumblebee_app'
- 'assemble'
- 'optimize-build'
- 'string-replace:final'
# - 'imagemin'
- 'cssmin'
- 'htmlmin'
# - 'string-replace:dist'
# - 'babel:release'
# - 'requirejs:release_concatenated'
# - 'uglify:release'
# - 'requirejs:release_css'
# - 'concurrent:hash_require'
# - 'copy:keep_original'
# - 'copy:bumblebee_app'
# - 'assemble'
4 changes: 3 additions & 1 deletion grunt/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*/
module.exports = {
release: {
src: ['dist/']
src: [
'dist/',
]
},
deploy: {
src: [
Expand Down
3 changes: 1 addition & 2 deletions grunt/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ module.exports = function (grunt) {
files: [{
expand: true,
src: [
'./src/**',
'!./src/index.html'
'./src/**'
],
dest: 'dist/',
rename: function(dest, src) {
Expand Down
13 changes: 13 additions & 0 deletions grunt/cssmin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';
/**
* Options for the `cssmin` grunt task
*
* @module grunt/cssmin
*/
module.exports = {
'release': {
files: {
'dist/styles/css/styles.css': 'dist/styles/css/styles.css'
}
}
};
9 changes: 7 additions & 2 deletions grunt/hash_require.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ module.exports = {
mapping: 'dist/jsmap.json',
destBasePath: 'dist/',
srcBasePath: 'dist/',
flatten:false
flatten: false,
clean: true,
prepend: true
},
src: ['dist/js/**/*.js']
src: [
'dist/*.js',
'dist/js/**/*.js'
]
},
css: {
options: {
Expand Down
20 changes: 20 additions & 0 deletions grunt/htmlmin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict';
/**
* Options for the `htmlmin` grunt task
*
* @module grunt/htmlmin
*/
module.exports = {
options: {
removeComments: true,
collapseWhitespace: true
},
'release': {
files: [{
expand: true,
cwd: 'dist',
src: ['*.html'],
dest: 'dist'
}]
}
};
22 changes: 22 additions & 0 deletions grunt/imagemin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';
/**
* Options for the `imagemin` grunt task
*
* @module grunt/imagemin
*/
module.exports = {
options: {
optimizationLevel: 3
},
'release': {
files: [{
expand: true,
cwd: 'dist/styles/',
src: [
'css/images/*.{svg,png,jpg,gif}',
'img/*.{svg,png,jpg,gif}'
],
dest: 'dist/styles/'
}]
}
};
Loading

0 comments on commit 079362b

Please sign in to comment.