{"_id":"nodefy","_rev":"16-a880629d305e5b67fc327be34f2a7e1a","name":"nodefy","description":"convert AMD modules into a node.js compatible format","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"nodefy","version":"0.1.0","description":"convert AMD modules into a node.js compatible format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/jasmine-node test"},"repository":{"type":"git","url":"https://github.com/millermedeiros/nodefy.git"},"keywords":["amd","cjs","modules","convert"],"author":{"name":"Miller Medeiros","url":"http://blog.millermedeiros.com/"},"dependencies":{"esprima":">= 1.0 <1.2","glob":"~3.1.14","async":"~0.1.22","commander":"~1.1.0"},"devDependencies":{"jasmine-node":"~1.0.26"},"bin":{"nodefy":"bin/nodefy"},"engine":{"node":">= 0.8"},"license":"MIT","readme":"# nodefy\n\nconvert AMD modules into a node.js compatible format.\n\n\n\n## How?\n\nThis tool uses [Esprima](http://esprima.org/) to parse the code and replace\n`define()` calls, doing the less amount of changes as possible to the code.\n\n### Input\n\n```js\ndefine(['foo', '../bar/baz'], function(foo, baz){\n\n    var lorem = 'ipsum';\n\n    return {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n\n});\n```\n\n### Output\n\n```js\n    var foo = require('foo');\n    var baz = require('../bar/baz');\n\n    var lorem = 'ipsum';\n\n    module.exports = {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n```\n\n\n## CLI\n\nYou can use it as a CLI tool:\n\n    [sudo] npm install -g nodefy\n    nodefy -o cjs \"src/**.js\"\n\nThis will convert all \".js\" files inside the `src` folder and put the results\non the `cjs` folder.\n\nIt also works with `stdin` and `stdout`:\n\n    cat \"src/foo.js\" | nodefy\n\nFor a list of available options run:\n\n    nodefy -h\n\n\n## Standalone Lib\n\nIt is also available as a regular node.js library.\n\n```js\nvar nodefy = require('nodefy');\n\n// nodefy.parse(string)\n// returns node.js style module\nvar cjsModule = nodefy.parse(jsString);\n\n// nodefy.convert(inputPath [, outputPath], callback)\n// if outputPath is omitted it won't write the result\nnodefy.convert('foo.js', function(err, result){\n    console.log(result);\n});\n\n// nodefy.batchConvert(glob [, outputFolder], callback)\n// if outputFolder is omitted it won't write the result\nnodefy.batchConvert('src/**.js', 'cjs', function(err, results){\n    // results is an array of {sourcePath, outputPath, result}\n});\n```\n\n\n## Inspiration / Why?\n\nI couldn't find any tool that did what I wanted - convert AMD modules into\nplain node.js - so I decided to code my own. There are alternatives but they\nall add more complexity than I wanted.\n\nThis project was created mainly because of\n[amd-utils](http://millermedeiros.github.com/amd-utils/), since many methods\nare useful on both environments.\n\nThe name was inpired by\n[browserify](https://github.com/substack/node-browserify).\n\n\n## Alternatives\n\n - [amdefine](https://github.com/jrburke/amdefine)\n - [UMD](https://github.com/umdjs/umd)\n - [r.js](https://github.com/jrburke/r.js)\n - [uRequire](https://github.com/anodynos/uRequire)\n\n\n## License\n\nReleased under the MIT license\n\n","_id":"nodefy@0.1.0","dist":{"shasum":"783af9373fde5625f6ed98071465125a9fe74afd","tarball":"https://registry.npmjs.org/nodefy/-/nodefy-0.1.0.tgz","integrity":"sha512-iI6JjHsOdErzO+lo6foQi3n9851fCiWQw3fyhBCt5JNN/QpoGJyeQGjXPuB7gw6YIyqK1D8nVNHnfVAhbZ1MJQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH830JQreKFCvaO4om2BI5eUkOJ1M/2GEqUBEo8h3/SNAiAHr+JvXxXyucdI/vkcItM5secEFFnhzZH0MsgB6kwrBg=="}]},"maintainers":[{"name":"millermedeiros","email":"miller@millermedeiros.com"}]},"0.2.0":{"name":"nodefy","version":"0.2.0","description":"convert AMD modules into a node.js compatible format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/jasmine-node test"},"repository":{"type":"git","url":"https://github.com/millermedeiros/nodefy.git"},"keywords":["amd","cjs","modules","convert"],"author":{"name":"Miller Medeiros","url":"http://blog.millermedeiros.com/"},"dependencies":{"esprima":">= 1.0 <1.2","glob":"~3.1.14","async":"~0.1.22","commander":"~1.1.0"},"devDependencies":{"jasmine-node":"~1.0.26"},"bin":{"nodefy":"bin/nodefy"},"engine":{"node":">= 0.8"},"license":"MIT","readme":"# nodefy\n\nconvert AMD modules into a node.js compatible format.\n\n\n\n## How?\n\nThis tool uses [Esprima](http://esprima.org/) to parse the code and replace\n`define()` calls, doing the less amount of changes as possible to the code.\n\n### Input\n\n```js\ndefine(['foo', '../bar/baz'], function(foo, baz){\n\n    var lorem = 'ipsum';\n\n    return {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n\n});\n```\n\n### Output\n\n```js\n    var foo = require('foo');\n    var baz = require('../bar/baz');\n\n    var lorem = 'ipsum';\n\n    module.exports = {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n```\n\n\n## CLI\n\nYou can use it as a CLI tool:\n\n    [sudo] npm install -g nodefy\n    nodefy -o cjs \"src/**.js\"\n\nThis will convert all \".js\" files inside the `src` folder and put the results\non the `cjs` folder.\n\nIt also works with `stdin` and `stdout`:\n\n    cat \"src/foo.js\" | nodefy\n\nFor a list of available options run:\n\n    nodefy -h\n\n\n## Standalone Lib\n\nIt is also available as a regular node.js library.\n\n```js\nvar nodefy = require('nodefy');\n\n// nodefy.parse(string)\n// returns node.js style module\nvar cjsModule = nodefy.parse(jsString);\n\n// nodefy.convert(inputPath [, outputPath], callback)\n// if outputPath is omitted it won't write the result\nnodefy.convert('foo.js', function(err, result){\n    console.log(result);\n});\n\n// nodefy.batchConvert(glob [, outputFolder], callback)\n// if outputFolder is omitted it won't write the result\nnodefy.batchConvert('src/**.js', 'cjs', function(err, results){\n    // results is an array of {sourcePath, outputPath, result}\n});\n```\n\n\n## Inspiration / Why?\n\nI couldn't find any tool that did what I wanted - convert AMD modules into\nplain node.js - so I decided to code my own. There are alternatives but they\nall add more complexity than I wanted.\n\nThis project was created mainly because of\n[amd-utils](http://millermedeiros.github.com/amd-utils/), since many methods\nare useful on both environments.\n\nThe name was inpired by\n[browserify](https://github.com/substack/node-browserify).\n\n\n## Alternatives\n\n - [amdefine](https://github.com/jrburke/amdefine)\n - [UMD](https://github.com/umdjs/umd)\n - [r.js](https://github.com/jrburke/r.js)\n - [uRequire](https://github.com/anodynos/uRequire)\n\n\n## License\n\nReleased under the MIT license\n\n","_id":"nodefy@0.2.0","dist":{"shasum":"d75e28c5ed5ef6f6599f0d8e51272118ece84b21","tarball":"https://registry.npmjs.org/nodefy/-/nodefy-0.2.0.tgz","integrity":"sha512-Dzkt0ESXDZgEI49RvPIoZ7DlCCPU+MJzbEnlkD5JDTaB8cokaNMMNRnew7mBXgUnPf87UQGieOJUaIBH7gEdbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdU+B/0MhJQS8Dj38uFtcdLht3LfK4BupKB+NdSM6RBQIgT6RP1e7tLnmDhWY81xArh1KshZ3oJuvHDh/8XLbSGsI="}]},"maintainers":[{"name":"millermedeiros","email":"miller@millermedeiros.com"}]},"0.2.1":{"name":"nodefy","version":"0.2.1","description":"convert AMD modules into a node.js compatible format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/jasmine-node test"},"repository":{"type":"git","url":"https://github.com/millermedeiros/nodefy.git"},"keywords":["amd","cjs","modules","convert"],"author":{"name":"Miller Medeiros","url":"http://blog.millermedeiros.com/"},"dependencies":{"esprima":">= 1.0 <1.2","glob":"~3.1.14","async":"~0.1.22","commander":"~1.1.0","mkdirp":"~0.3.4"},"devDependencies":{"jasmine-node":"~1.0.26"},"bin":{"nodefy":"bin/nodefy"},"engine":{"node":">= 0.8"},"license":"MIT","readme":"# nodefy\n\nconvert AMD modules into a node.js compatible format.\n\n\n\n## How?\n\nThis tool uses [Esprima](http://esprima.org/) to parse the code and replace\n`define()` calls, doing the less amount of changes as possible to the code.\n\n### Input\n\n```js\ndefine(['foo', '../bar/baz'], function(foo, baz){\n\n    var lorem = 'ipsum';\n\n    return {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n\n});\n```\n\n### Output\n\n```js\n    var foo = require('foo');\n    var baz = require('../bar/baz');\n\n    var lorem = 'ipsum';\n\n    module.exports = {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n```\n\n\n## CLI\n\nYou can use it as a CLI tool:\n\n    [sudo] npm install -g nodefy\n    nodefy -o cjs \"src/**.js\"\n\nThis will convert all \".js\" files inside the `src` folder and put the results\non the `cjs` folder.\n\nIt also works with `stdin` and `stdout`:\n\n    cat \"src/foo.js\" | nodefy\n\nFor a list of available options run:\n\n    nodefy -h\n\n\n## Standalone Lib\n\nIt is also available as a regular node.js library.\n\n```js\nvar nodefy = require('nodefy');\n\n// nodefy.parse(string)\n// returns node.js style module\nvar cjsModule = nodefy.parse(jsString);\n\n// nodefy.convert(inputPath [, outputPath], callback)\n// if outputPath is omitted it won't write the result\nnodefy.convert('foo.js', function(err, result){\n    console.log(result);\n});\n\n// nodefy.batchConvert(glob [, outputFolder], callback)\n// if outputFolder is omitted it won't write the result\nnodefy.batchConvert('src/**.js', 'cjs', function(err, results){\n    // results is an array of {sourcePath, outputPath, result}\n});\n```\n\n\n## Inspiration / Why?\n\nI couldn't find any tool that did what I wanted - convert AMD modules into\nplain node.js - so I decided to code my own. There are alternatives but they\nall add more complexity than I wanted.\n\nThis project was created mainly because of\n[amd-utils](http://millermedeiros.github.com/amd-utils/), since many methods\nare useful on both environments.\n\nThe name was inpired by\n[browserify](https://github.com/substack/node-browserify).\n\n\n## Alternatives\n\n - [amdefine](https://github.com/jrburke/amdefine)\n - [UMD](https://github.com/umdjs/umd)\n - [r.js](https://github.com/jrburke/r.js)\n - [uRequire](https://github.com/anodynos/uRequire)\n\n\n## License\n\nReleased under the MIT license\n\n","_id":"nodefy@0.2.1","dist":{"shasum":"36306d5dc9621750a283baedcc5729fb77a8a29c","tarball":"https://registry.npmjs.org/nodefy/-/nodefy-0.2.1.tgz","integrity":"sha512-14+6y37sOEJCY8q7nSkjpfAr/brGKRlhwt0STWySau2SgVg3LeUzN9AcJ52tU32y+lsO3oCvH8i/EAHI+/ixLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAvIbIZXILPs4dqqTMW1RSc8IvMIUM797YQ+09NaP6xQIgYWoHXoOIOXJe2AY1SowC7YmQLEkrs/q6px5QAOfKqm8="}]},"maintainers":[{"name":"millermedeiros","email":"miller@millermedeiros.com"}]},"0.2.2":{"name":"nodefy","version":"0.2.2","description":"convert AMD modules into a node.js compatible format","main":"index.js","directories":{"test":"test"},"scripts":{"test":"./node_modules/.bin/jasmine-node test"},"repository":{"type":"git","url":"https://github.com/millermedeiros/nodefy.git"},"keywords":["amd","cjs","modules","convert"],"author":{"name":"Miller Medeiros","url":"http://blog.millermedeiros.com/"},"dependencies":{"esprima":">= 1.0 <1.2","glob":"~3.1.14","async":"~0.1.22","commander":"~1.1.0","mkdirp":"~0.3.4"},"devDependencies":{"jasmine-node":"~1.0.26"},"bin":{"nodefy":"bin/nodefy"},"engine":{"node":">= 0.8"},"license":"MIT","readme":"# nodefy\n\nconvert AMD modules into a node.js compatible format.\n\n\n\n## How?\n\nThis tool uses [Esprima](http://esprima.org/) to parse the code and replace\n`define()` calls, doing the less amount of changes as possible to the code.\n\n### Input\n\n```js\ndefine(['foo', '../bar/baz'], function(foo, baz){\n\n    var lorem = 'ipsum';\n\n    return {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n\n});\n```\n\n### Output\n\n```js\n    var foo = require('foo');\n    var baz = require('../bar/baz');\n\n    var lorem = 'ipsum';\n\n    module.exports = {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n```\n\n\n## CLI\n\nYou can use it as a CLI tool:\n\n    [sudo] npm install -g nodefy\n    nodefy -o cjs \"src/**.js\"\n\nThis will convert all \".js\" files inside the `src` folder and put the results\non the `cjs` folder.\n\nIt also works with `stdin` and `stdout`:\n\n    cat \"src/foo.js\" | nodefy\n\nFor a list of available options run:\n\n    nodefy -h\n\n\n## Standalone Lib\n\nIt is also available as a regular node.js library.\n\n```js\nvar nodefy = require('nodefy');\n\n// nodefy.parse(string)\n// returns node.js style module\nvar cjsModule = nodefy.parse(jsString);\n\n// nodefy.convert(inputPath [, outputPath], callback)\n// if outputPath is omitted it won't write the result\nnodefy.convert('foo.js', function(err, result){\n    console.log(result);\n});\n\n// nodefy.batchConvert(glob [, outputFolder], callback)\n// if outputFolder is omitted it won't write the result\nnodefy.batchConvert('src/**.js', 'cjs', function(err, results){\n    // results is an array of {sourcePath, outputPath, result}\n});\n```\n\n\n## Inspiration / Why?\n\nI couldn't find any tool that did what I wanted - convert AMD modules into\nplain node.js - so I decided to code my own. There are alternatives but they\nall add more complexity than I wanted.\n\nThis project was created mainly because of\n[amd-utils](http://millermedeiros.github.com/amd-utils/), since many methods\nare useful on both environments.\n\nThe name was inpired by\n[browserify](https://github.com/substack/node-browserify).\n\n\n\n## Features, Goals & Limitations\n\nThe [Asynchronous Module\nDefinition](https://github.com/amdjs/amdjs-api/wiki/AMD) is very flexible, it\nsupports [plugins](https://github.com/amdjs/amdjs-api/wiki/Loader-Plugins),\nmany [configuration\nsettings](https://github.com/amdjs/amdjs-api/wiki/Common-Config) to define how\nmodules should be loaded and asynchronous module loading.\n\n**This tool aims to convert basic modules**, plugins and advanced settings\nprobably are NOT going to be supported in the near future (I have plans to\nsupport basic configs, see [issue 6](https://github.com/millermedeiros/nodefy/issues/6)).\nCheck the [uRequire](https://github.com/anodynos/uRequire) project in case you need\nsomething more complex or create a new feature request on the [issues\ntracker](https://github.com/millermedeiros/nodefy/issues).\n\n\n\n## Alternatives\n\n - [amdefine](https://github.com/jrburke/amdefine)\n - [UMD](https://github.com/umdjs/umd)\n - [r.js](https://github.com/jrburke/r.js)\n - [uRequire](https://github.com/anodynos/uRequire)\n\n\n## License\n\nReleased under the MIT license\n\n","_id":"nodefy@0.2.2","dist":{"shasum":"da2fadc0e035be3b9652905c8f7a05930e90b468","tarball":"https://registry.npmjs.org/nodefy/-/nodefy-0.2.2.tgz","integrity":"sha512-GV6yvRaPIe50ZloGbG464rmBf+3TWY5ihxFispOo7Up/dMET8xIZOKlWwCf7bz/fhx5JBlIQBnmBrZI+v+O4SQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICVbwAljwVAtLlO8VCV5w82Jvr5GfJj5pwhRul+RrconAiA3pkpOLtZdPKXftX6jM7Q9lq8mVZ0sXaG7nz2y8ehTAA=="}]},"maintainers":[{"name":"millermedeiros","email":"miller@millermedeiros.com"}]}},"readme":"# nodefy\n\nconvert AMD modules into a node.js compatible format.\n\n\n\n## How?\n\nThis tool uses [Esprima](http://esprima.org/) to parse the code and replace\n`define()` calls, doing the less amount of changes as possible to the code.\n\n### Input\n\n```js\ndefine(['foo', '../bar/baz'], function(foo, baz){\n\n    var lorem = 'ipsum';\n\n    return {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n\n});\n```\n\n### Output\n\n```js\n    var foo = require('foo');\n    var baz = require('../bar/baz');\n\n    var lorem = 'ipsum';\n\n    module.exports = {\n        log : function(){\n            console.log(lorem);\n        }\n    };\n```\n\n\n## CLI\n\nYou can use it as a CLI tool:\n\n    [sudo] npm install -g nodefy\n    nodefy -o cjs \"src/**.js\"\n\nThis will convert all \".js\" files inside the `src` folder and put the results\non the `cjs` folder.\n\nIt also works with `stdin` and `stdout`:\n\n    cat \"src/foo.js\" | nodefy\n\nFor a list of available options run:\n\n    nodefy -h\n\n\n## Standalone Lib\n\nIt is also available as a regular node.js library.\n\n```js\nvar nodefy = require('nodefy');\n\n// nodefy.parse(string)\n// returns node.js style module\nvar cjsModule = nodefy.parse(jsString);\n\n// nodefy.convert(inputPath [, outputPath], callback)\n// if outputPath is omitted it won't write the result\nnodefy.convert('foo.js', function(err, result){\n    console.log(result);\n});\n\n// nodefy.batchConvert(glob [, outputFolder], callback)\n// if outputFolder is omitted it won't write the result\nnodefy.batchConvert('src/**.js', 'cjs', function(err, results){\n    // results is an array of {sourcePath, outputPath, result}\n});\n```\n\n\n## Inspiration / Why?\n\nI couldn't find any tool that did what I wanted - convert AMD modules into\nplain node.js - so I decided to code my own. There are alternatives but they\nall add more complexity than I wanted.\n\nThis project was created mainly because of\n[amd-utils](http://millermedeiros.github.com/amd-utils/), since many methods\nare useful on both environments.\n\nThe name was inpired by\n[browserify](https://github.com/substack/node-browserify).\n\n\n## Alternatives\n\n - [amdefine](https://github.com/jrburke/amdefine)\n - [UMD](https://github.com/umdjs/umd)\n - [r.js](https://github.com/jrburke/r.js)\n - [uRequire](https://github.com/anodynos/uRequire)\n\n\n## License\n\nReleased under the MIT license\n\n","maintainers":[{"name":"millermedeiros","email":"miller@millermedeiros.com"}],"time":{"modified":"2022-06-22T02:06:28.182Z","created":"2012-11-20T02:02:42.071Z","0.1.0":"2012-11-20T02:02:44.451Z","0.2.0":"2012-11-20T13:55:08.243Z","0.2.1":"2012-11-21T12:54:55.482Z","0.3.0":"2013-03-05T14:12:41.491Z","0.2.2":"2013-03-05T14:16:28.590Z"},"author":{"name":"Miller Medeiros","url":"http://blog.millermedeiros.com/"},"repository":{"type":"git","url":"https://github.com/millermedeiros/nodefy.git"},"users":{"millermedeiros":true}}