Skip to content

Support for CommonJS - issue #6 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

richardwilly98
Copy link

PR includes a unit test see [1].

[1] - richardwilly98@e3c0393#L2R207

dadoonet pushed a commit to dadoonet/elasticsearch-lang-javascript that referenced this pull request Jan 15, 2014
You can add your javascript modules under `config/scripts/modules/` and use them
in scripts:

For example, add `config/scripts/modules/pi.js`

```javascript
exports.getPI = function(value) {
    return 3.14;
};
```

You can use it in a script:

```javascript
var pi = require('pi');
ctx.pi = pi.getPI();
```

Closes elastic#6.
Closes elastic#7.
@dadoonet
Copy link
Contributor

Thanks for your PR @richardwilly98.
Closing it in favor of #11 (rebased on latest changes, some modification and without code formatting :-) )

@dadoonet dadoonet closed this Jan 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants