nss

node-spider-script

Run spider script files as javascript modules in NodeJS.

Showing:

Popularity

Downloads/wk

5

GitHub Stars

6

Maintenance

Last Commit

3yrs ago

Contributors

2

Package

Dependencies

2

Size (min+gzip)

99.4KB

License

Apache-2.0

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
spider script is no longer available.

Readme

node-spider-script

NPM Version Build Status Coverage Status Inline docs
License Total Downloads Dependency Status devDependency Status

Load spider script as any javascript modules under nodeJS runtime.

Overview

Spider is a programming language that compiles to JavaScript. It takes the best ideas of Swift, Python, C# and CoffeeScript.

See spiderlang.org for more information.

Usage

In order to use spider scripts under node, you need to first require this library as follows

require('node-spider-script');

Now you can require your spider files like any other javascript files, for example:

var jsModule = require('./my-test.spider');

var person = jsModule.create('my name');
var output = person.listen('my noise');

In your spider file, instead of doing module.exports, do return to the object you wish to export.

For example:

return {
    create: fn(name) {
        return new Person(name);
    }
};

Full example (Spider):

fn Person(name) {
  this.name = name;

  this.listen = fn (text) {
    return this.name + ' ' + text;
  };
}

return {
    create: fn(name) {
        return new Person(name);
    }
};

Full example (JavaScript):

require('node-spider-script');

var jsModule = require('./my-test.spider');

var person = jsModule.create('my name');
var output = person.listen('my noise');

Installation

In order to use this library, just run the following npm install command:

npm install --save node-spider-script

API Documentation

See full docs at: API Docs

Contributing

See contributing guide

Release History

DateVersionDescription
2018-10-31v1.0.39Maintenance
2015-02-06v0.0.20Grunt cleanups
2014-12-07v0.0.16Minor internal changes
2014-12-01v0.0.14Added continues integration support for the project
2014-11-30v0.0.13Internal changes due to spider dependency changes
2014-11-29v0.0.12Updated spider dependency
2014-11-29v0.0.11Internal improvements
2014-11-22v0.0.7JSDoc changes
2014-11-22v0.0.6Fixed pure require approach
2014-11-22v0.0.5Initial release

License

Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial