0.1.2 • Published 11 years ago

grunt-dep-concat v0.1.2

Weekly downloads
192
License
-
Repository
github
Last release
11 years ago

grunt-dep-concat

Concatenate files in order based on dependencies.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-dep-concat

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-dep-concat');

Documentation

This plugin requires tsort.

So you have a large number of files with implicit dependencies based on the order in which you list them in your gruntfile, and which must be manually maintained. Don't we have new-fangled computer things to sort this out for us? Add this to your source files:

// load: some_loadtime_dependency.js

// run: a_runtime_dependency.js
/* run: another_runtime_dependency.js */
// run: a.js, long/list.js, of/runtime/dependencies.js

(function() {
  // …
}( SomeLoadtimeDependency ));

Then, instead of using the concat task, use the depconcat.

grunt.initConfig({
  depconcat: {
    dist: {
      src: ['src/**/*.js'],
      dest: 'dist/foo.js'
    }
  }
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

  • 2012/06/12 - v0.1.1 - Initial release.

License

Copyright (c) 2012 Eric Li Licensed under the MIT license.

0.1.2

11 years ago

0.1.2rc1

11 years ago

0.1.1

12 years ago