Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joris-van-der-wel/node-static-reference

Annotate file references within the source code of your node packages. These references can be scanned for using the dependency graph of a module.
https://github.com/joris-van-der-wel/node-static-reference

Last synced: 1 day ago
JSON representation

Annotate file references within the source code of your node packages. These references can be scanned for using the dependency graph of a module.

Awesome Lists containing this project

README

        

static-reference
================
Annotate file references within the source code of your node packages. These references can be scanned for using the dependency graph of a module. This package only defines the reference itself, other modules are used to scan your source code for this annotation (such as _module-references_ [npm](https://www.npmjs.org/package/module-references) [github](https://github.com/Joris-van-der-Wel/node-module-references) ).

usage
-----
```javascript
require('static-reference')('./foo.css');
require('static-reference')("./foo.less");
require('static-reference')('./foo-mobile.css', 'mobile');
```
Only a string literal will work properly, for example `require('static-reference')('./foo' + '.css');` will be ignored. The require call is looked for while parsing your source code, the call has no effect at runtime. `require('static-reference')` will always return a dummy function that performs no operations.