Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the JavaScript Minifier in CodeKit?

What's the best way to disable JavaScript minification in CodeKit? All those *-ck.js files it creates are making a mess of our repository's submodules.

Note that adding a rule to .gitignore doesn't work because its rules aren't inherited by submodules.

like image 773
joemaller Avatar asked Apr 23 '13 15:04

joemaller


People also ask

How do I minify JavaScript code?

To minify JavaScript, try UglifyJS. The Closure Compiler is also very effective. You can create a build process that uses these tools to minify and rename the development files and save them to a production directory.

Does Minifying JavaScript improve performance?

By reducing file sizes, JavaScript minification can improve webpage performance.

What is the best JavaScript Minifier?

UglifyJS is one of the most popular JavaScript minification tools. It can parse, minify and compress JavaScript code. Besides, the tool generates a source map file while compressing to track back to your original code.

What does JavaScript Minification do?

Minification is the process of minimizing code and markup in your web pages and script files. It's one of the main methods used to reduce load times and bandwidth usage on websites. Minification dramatically improves site speed and accessibility, directly translating into a better user experience.


2 Answers

In CodeKit Preferences select Languages / JavaScript to edit the default settings for JavaScript handling. (These can be overridden for each file in a project.)

Change the setting for the second processing step (labelled "Then:") from "Concatenate + minifiy" to "Concatenate imported files". For any script file already in the project check whether it already has individual settings which still differ from this new default.

In this case, "*-ck.js"-files should only be created in case a source file imports another for concatenation but not for ordinary script files.

Alternatively you might specify a different output path for the generated ck-Files in CodeKit Preferences / JavaScript / Output Paths in order not to let the generated files clutter the source directory.

like image 192
immo Avatar answered Sep 20 '22 20:09

immo


I believe the menu has been updated, but the answer from immo still stands. Under Javascript Language settings you can click a dropdown for output style and change it from minified to non-minified.

enter image description here

like image 28
mcsharps Avatar answered Sep 19 '22 20:09

mcsharps