I am trying to combine all my plugins to change this:
<html>
<head>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/plugin1.js"></script>
<script src="js/plugin2.js"></script>
<script src="js/plugin3.js"></script>
<script src="js/plugin4.js"></script>
</body>
</html>
:
<html>
<head>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/plugins.min.js"></script>
</body>
</html>
The main idea is to have a tool to automatically import into my plugins.js file for all the plugins that I need for my websites, as well as to minimize them when compiling. I tested using Google Closure (a downloadable Java version of the compiler), and I decided how to minimize the files, but I cannot import external files. So I would like to ask you if you can tell me if Google Closure is the tool I'm looking for, or if I should use another tool or method.
With "auto import", I mean something like:
PLUGINS / HELLO.JS
function hello(name) {
alert('Hello, ' + name);
}
PLUGINS.JS
@import hello.js
hello('New user');
I hope I made it clear, I apologize if I ruined my English.
Thank!!