static-reference

1.0.0 • Public • Published

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 github ).

usage

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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i static-reference

      Weekly Downloads

      1

      Version

      1.0.0

      License

      MIT

      Last publish

      Collaborators

      • joris-van-der-wel