w3develops / w3Develops

The w3develops.org open source codebase - Learn, build, and meetup with other developers on DISCORD https://discord.gg/WphGvTT and YOUTUBE http://bit.ly/codingyt

Home Page:https://w3develops.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gulp unable to minify js because of study_sorter.js

JonDevOps opened this issue · comments

I receive the following Error Message after running the "gulp js" or "gulp watch" commands:

GulpUglifyError: unable to minify JavaScript
Caused by: SyntaxError: Unexpected token: keyword «const»
File: /mnt/c/Users/offic/Desktop/workspace/w3develops/js/study_sorter.js
Line: 8
Col: 8

This makes gulp unable to minify the JavaScript.

Yeah, from what I've briefly read it breaks encapsulation so if we can resolve that we should be able to minify. I'm not sure that const is supported during that process. This needs refactored and reworked anyway. It's possible that we could reincorporate js on the html page to include any constants, not sure yet.

Edit to include source: https://stackoverflow.com/questions/45731969/how-to-do-constant-values-minification-in-javascript

Edit 2: It doesn't actually tell you how to do constant values...