-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
354 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
================================================================== | ||
Add to documentation: Minify Resources (HTML, CSS, and JavaScript) | ||
================================================================== | ||
|
||
Comment the property 'urlArgs' in the RequireJS main file (requirejs_main.js). | ||
|
||
1) For minifying HTML: | ||
|
||
https://www.npmjs.com/package/html-minifier | ||
|
||
$ html-minifier -c html-minifier.conf index.html | ||
|
||
$ find dist/js/ -iname '*.html' -print0 | xargs -0 -I"{}" html-minifier "{}" -c html-minifier.conf -o "{}" | ||
|
||
2) For minifying CSS: | ||
|
||
See: 3.b - RequireJS optimization tool | ||
|
||
3) For minifying JavaScript: | ||
|
||
3.a) Standalone: | ||
|
||
https://github.com/mishoo/UglifyJS2 | ||
|
||
$ uglifyjs -c -m -o jquery.spin.min.js --source-map jquery.spin.min.map -- jquery.spin.js | ||
|
||
3.b) RequireJS optimization tool: | ||
|
||
http://requirejs.org/docs/optimization.html | ||
|
||
https://github.com/jrburke/r.js/blob/master/build/example.build.js | ||
|
||
$ r.js -o build.js | ||
|
||
========================== | ||
Optimization full example: | ||
========================== | ||
|
||
ertorser@regab:~$ mkdir TEMP | ||
|
||
ertorser@regab:~$ cd TEMP/ | ||
|
||
ertorser@regab:~/TEMP$ clear ; rm -rf /home/ertorser/TEMP/ui/ ; \ | ||
cp -r ~/Workspace/eclipse-jee-luna/leishmaniasis-virtual-lab/lvl-project/lvl-bundle/src/main/ui/ /home/ertorser/TEMP/ | ||
|
||
ertorser@regab:~/TEMP/ui$ r.js -o build.js | ||
|
||
ertorser@regab:~/TEMP$ find dist/js/ -iname '*.html' -print0 | xargs -0 -I"{}" html-minifier "{}" -c html-minifier.conf -o "{}" | ||
|
||
ertorser@regab:~/TEMP/ui$ cd dist/ | ||
|
||
ertorser@regab:~/TEMP/ui/dist$ rm -f build.txt | ||
|
||
ertorser@regab:~/TEMP/ui/dist$ python -m SimpleHTTPServer 8001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Original images before they are optimized for Web using TinyPNG: https://tinypng.com/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,30 @@ | ||
({ | ||
baseUrl : 'js', | ||
/* r.js -o build.js */ | ||
({ | ||
mainConfigFile : 'js/requirejs_main.js', | ||
name : 'app', | ||
out : 'dist/js/requirejs_main.js', | ||
wrap : true, | ||
findNestedDependencies : true, | ||
removeCombined : true, | ||
optimize : 'uglify2', | ||
appDir : './', | ||
baseUrl : 'js', | ||
dir : 'dist', | ||
removeCombined : true, | ||
findNestedDependencies : true, | ||
inlineText : true, | ||
preserveLicenseComments : false | ||
preserveLicenseComments : false, | ||
wrap : true, | ||
wrapShim : true, | ||
optimize : 'uglify2', // 'none', | ||
optimizeCss : 'standard', | ||
fileExclusionRegExp : /^\.|^(r|build)\.js$|\.map$|html-minifier\.conf/, | ||
modules: [ | ||
{ | ||
name : 'requirejs_main', | ||
excludeShallow : [ | ||
'text!data/config.json', | ||
'text!data/pipelines.json', | ||
'text!data/events.json' | ||
] | ||
} | ||
], | ||
paths : { | ||
jquery : 'empty:', | ||
bootstrap : 'empty:' | ||
} | ||
}) |
7 changes: 0 additions & 7 deletions
7
lvl-project/lvl-bundle/src/main/ui/css/bootstrap-paper.min.css
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"removeComments" : true, | ||
"removeCommentsFromCDATA" : true, | ||
"removeCDATASectionsFromCDATA" : true, | ||
"collapseWhitespace" : true, | ||
"conservativeCollapse" : false, | ||
"collapseBooleanAttributes" : false, | ||
"removeAttributeQuotes" : false, | ||
"removeRedundantAttributes" : true, | ||
"useShortDoctype" : true, | ||
"removeEmptyAttributes" : true, | ||
"removeOptionalTags" : false, | ||
"removeEmptyElements" : false, | ||
"lint" : false, | ||
"keepClosingSlash" : false, | ||
"caseSensitive" : false, | ||
"minifyJS" : false, | ||
"minifyCSS" : false | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.