prototype4node is an attempt to bring the power and simplicity of the prototypejs library, to NodeJS.
My intention is to provide equal results with the browser version of Prototypejs, even if the code isn't exactly the same.
<<<<<<< HEAD prototype4node is a npm package, installing is as simple as listing it as a dependency in your package.json file. You should also be able to isntall it directly from npm via,
npm install prototype4node
npm install -g prototype4node
Convert existing library to better manage scope, and bring more in line with CommonJS practices.
- Investigate ways to improve performance (still want to find more ways to improve performance, but reducing the number of files has had its benefits)
Create unit tests with the goal of each test passing in both the browser and nodejs. Test coverage should match major features, using examples pulled from the API when possible.
- Create npm package
Partially converted parts of existing library. I have also written some unit tests using the Mocha testing platform. The tests are not as comprehensive as the unit tests prototype provides, but the goal isn't to rewrite all of prototypes tests, just for major features. I have also identified and resolved an issue that was preventing me from extending the Hash object in another project.
Open up the file tests/index.html to run all tests. All libraries (mocha, prototype, assert) are contained within the tests/lib directory.
- Download and install the mocha testing framework. At the time of writing this is done via npm,
npm install -g mocha
- Run mocha, passing the tests directory,
mocha ./tests -R spec
PrototypeJS - https://github.com/sstephenson/prototype prototype.node.js - https://github.com/Rixius/prototype.node.js