Skip to content

Commit

Permalink
Minified JS
Browse files Browse the repository at this point in the history
Patched for smoother bubble updating and minfied JS with uglifyjs for ES6
  • Loading branch information
Daniel Fridkin committed Apr 16, 2018
1 parent a362f7b commit 50c51cd
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"group": "build",
"dependsOn": "Compile SCSS"
},
{
"label": "Uglify JS",
"type": "shell",
"command": "uglifyjs js/main.js -co js/main.min.js",
"group": "build"
},
{
"label": "Host Local Server",
"type": "shell",
Expand All @@ -26,7 +32,8 @@
"isDefault": true
},
"dependsOn": [
"Minify CSS"
"Minify CSS",
"Uglify JS"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
crossorigin="anonymous" defer></script>

<!-- Custom JS -->
<script src="js/main.js" defer></script>
<script src="js/main.min.js" defer></script>

</head>

Expand Down
1 change: 1 addition & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ function callbackWrapper(data) {
// This is kind of a trash workaround but...if the user clicked "Stop" then don't update the bubbles.
if (commentGetter.gettingComments) {
updateBubbles();
updateBubbles(); // Ok also you need to update twice to like unstick the center bubbles? Idk
}

}
Expand Down
1 change: 1 addition & 0 deletions js/main.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"dependencies": {
"css-minify": "^1.0.1",
"lite-server": "^2.3.0",
"node-sass": "^4.8.3"
"node-sass": "^4.8.3",
"uglify-es": "github:mishoo/UglifyJS2#harmony"
}
}

0 comments on commit 50c51cd

Please sign in to comment.