2

Is it possible to compile my javascript files into one file using require.js while building my html5 application?

I'm using NetBeans 7.4.

1 Answer 1

1

I'm not sure about tools with Netbeans integration but I'd take a look at using Grunt. You can probably add it as an external builder inside of Netbeans.

Grunt has a requirejs plugin that will compile and concatenate all of your js files.


To be honest, Grunt can take some time to get started with if you've never used it before. To alleviate that, there is the Yeoman project which provides several generators to create the Gruntfile and other scaffolding for you.

I'd really take a look at Yeoman if I was in your shoes as you'll also get dependency management, image optimization, css minification and concatenation, and versioned artifact names. The yeoman developers have really thought of everything that is required in the build of a html5 app and automated all of it for you. It even goes so far as to correctly replace any link and script tags you have with references to the newly generated minified versions.

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

Comments

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.