0.1.2 • Published 11 years ago

grunt-resolve v0.1.2

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

resolve

Grunt task to resolve require tags in JavaScript files

The following file app.js requires the file controller.js to be prepended:

This is controller.js to be prepended to app.js.

In the Gruntfile.js we put now

This will create dist/app.js with the concatenated source code. resolve resolves files recursively, normalizes multiple dependencies from and to a given file, skips declared dependencies not found on disk and is robust concerning circular dependencies (does not loop).

Declaring dependencies

In a JavaScript file one or more require lines can be added:

All require lines of a file are gathered, hoisted to the top of the file and recursively resolved for transitive dependencies.

Multiple files can be listed separated by commas:

Dependencies are relative to the source file containing the require line:

Grunt task config

The complete configuration options are as follows:

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago