7

I'm a kind of big rookie, using Netbeans 6.9 as a PHP dev tool.

Currently I do develop and test locally on my PC using XAMPP/Apache/MySQL and once done, use Netbeans "upload" facility to the production server on the web.

I was wondering if there's a Netbeans tool capable of minifying js/CSS files on upload, or a tool to minify the whole "production" environement, on request.

3
  • This might be a late comment, but this question appears on top search result.Therefore, I have a question. If you have tried the plugin, can you manage to change the output directory ? Commented Feb 4, 2014 at 9:35
  • Sorry, but I haven't tried. Commented Feb 4, 2014 at 14:30
  • it's ok, thanks. This plug in needs to be updated to allow more customization such as change the build directory path and name. Commented Feb 5, 2014 at 8:54

3 Answers 3

8

Netbeans JS CSS Minify Plugin : Download From Here

Sign up to request clarification or add additional context in comments.

2 Comments

Break url. Is'nt working.
Is there an alternate location for this plugin?
2

Not integrated with Netbeans but will do the trick for what you want: http://code.google.com/p/minify/

6 Comments

I personally prefer the YUI Compressor (developer.yahoo.com/yui/compressor). Same thing though :D
Is there a best practice to minify only the "production" website?
In terms of best practice, "minify" your code before you put it into production is really only suggestion I can make. My suggestion is to write a script to minify your code when you are ready to push to production.
If you have numerous scripts, it'd be good to combine them into a single script so the browser is making a single HTTP request instead of a dozen requests. The file will be larger, but if it's minified, it shouldn't be terrible. I hate Wordpress blogs that have 22 JS files and 30 CSS files.
Nathan, same here. I'm looking at W3 Total cache, seems quite nice doing a part of the job. Needs tuning and some drawbacks: it looks like it can cache and minify external JS (according to YSlow I have 26... ARRRGGHHH!!!), however you will have to continuously check for updated versions of cached JS....
|
-1

I usually write a deployment script that does all these things for me: It copies the current development version to a deployment folder, filtering out files I don't need, generating the correct settings files, and a bunch of other deployment-related tasks. The result is a folder that matches the folder structure on the web server exactly; from there, all I need to do is upload everything. On *nix systems, this is even more powerful because pretty much everything is designed to be scriptable. If you adopt such a scheme, all you need is a scriptable minifier, add it to the deployment script and you're all set.

1 Comment

At the moment Netbeans itself is capable to mantain the same structure on the production server in such a way, once a source file is ready to be deployed, I just force "upload" and Netbeans will do the rest, storing the source file accordingly in the proper folder on the production server....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.