0.0.1 • Published 2 years ago

incirca v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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

  1. 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

  1. 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