grunt-unifon

Grunt task to unify javascript files, configured by JSON.

Usage no npm install needed!

<script type="module">
  import gruntUnifon from 'https://cdn.skypack.dev/grunt-unifon';
</script>

README

grunt-unifon

Grunt task to unify javascript files by JSON.

Example

grunt.initConfig({
    unifon: {
        dest: {
            options: {
                separator: "\n"
            },
            files: {
                "js/main.js": "js/main.json"
            }
        }
    }
});

main.json example:

[
    "foo.js",
    "bar.js",
    "mod/baz.js"
]
  • Content of files above are to be concatenated, saved as "main.js".
  • The path to the files must be relative to the JSON file.