incirca
v0.0.1
Published
build-time comment-based dependency includer
Downloads
13
Maintainers
Readme
Incirca
Build-time Comment-based Dependency Includer
About
Incirca enables you to include local file-based dependencies into your existing code base using specially-formatted multi-line comments.
This enables you to include dependencies [in-place] directly into your code and eliminates the need for build-time concatenation.
Usage
- Add include/require/import directives anywhere in your code
/* file.js */
// Your dependencies
/* !import('/path/to/local/dep1.js'); */
/* !include('/path/to/local/dep2.js'); */
/* !require('/path/to/local/dep3.js'); */
// Your code
Note: You can use either
!import
,!include
, or!require
directives
- Add the following command to your build step or
package.json
scripts:
incirca --path="/path/to/your/file.js"
OR
...
"scripts": {
...
"build:incirca": "incirca --path='/path/to/your/file.js'",
...
}
...
Note: Use multiple
--path
flags to define multiple files
Incirca will then include the referenced files directly into your code.
License
MIT