Follow these steps to add Ray globally available in your JavaScript/TypeScript project:
- Create the required files
$ mkdir ./ray
$ touch ./ray/index.js
$ touch ./ray/ray.d.ts
- Import in your app's entry
import 'path/to/ray';
- For TypeScript, be sure
ray/ray.d.ts
is somehow included intsconfig.json
- Use it anywhere; f.ex
ray('hello world);