Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/joris-van-der-wel/node-static-reference
- Owner: Joris-van-der-Wel
- Created: 2014-08-27T18:56:31.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-04T22:46:35.000Z (about 10 years ago)
- Last Synced: 2023-12-25T07:05:11.424Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.