This project:
- is a case-study for browserifying anything
- part of a dream to create virtual Node.js development environment
- likely a major time-sink!
starting out:
mkdir browser-npm && cd browser-npm
npm install npm
| NAME DESCRIPTION AUTHOR DATE VERSION KEYWORDS | |
| atlaspack Pack rectangles (or images) into a rectangle (or canvas texture atlas). =shama 2013-04-25 22:30 0.2.4 voxel texture atlas geometry spritemap | |
| craft An HTML5 crafting API. =shama 2013-05-07 16:23 0.1.0 voxel crafting minecraft | |
| greedy-mesher Greedy mesh compiler =mikolalysenko 2013-06-02 19:20 0.0.0 greedy mesh compiler voxel geometry ndarray | |
| isosurface 3D isosurface polygonizer =mikolalysenko 2013-02-11 19:03 0.1.0 voxel isosurface level set 0fps surface nets marching cubes tetrahedra | |
| minecraft-chunk read voxel data from minecraft chunks =maxogden 2013-04-22 07:22 0.3.0 | |
| mineflayer-voxel A plugin to give you a web-based view of your mineflay |
| [response cut] | |
| ,"abc-gruntfile-helper":{"name":"abc-gruntfile-helper","description":"Helpers to easier the configuration of gruntfile for ABC","dist-tags":{"latest":"0.0.1"} | |
| ,"maintainers":[{"name":"neekey","email":"ni184775761@gmail.com"} | |
| ],"author":{"name":"neekey","email":"ni184775761@gmail.com"} | |
| ,"repository":{"type":"git","url":"https://github.com/neekey/abc-gruntfile-helper"} | |
| ,"time":{"modified":"2013-04-27T09:26:20.701Z"} | |
| ,"versions":{"0.0.1":"latest"} | |
| ,"keywords":["abc gruntfile helper kissypie"]} | |
| ,"abc-tpl-kissypie":{"name":"abc-tpl-kissypie","description":"ABC推荐目录.","dist-tags":{"latest":"0.0.1"} |
| module.exports = { | |
| O_RDONLY: 0, | |
| O_WRONLY: 1, | |
| O_RDWR: 2, | |
| S_IFMT: 61440, | |
| S_IFREG: 32768, | |
| S_IFDIR: 16384, | |
| S_IFCHR: 8192, | |
| S_IFBLK: 24576, | |
| S_IFIFO: 4096, |
| // =========================================================== | |
| // =========================================================== | |
| // THIS IS COPY-PASTE-HACK. THIS IS NOT KNOWN TO ACTUALLY WORK | |
| // =========================================================== | |
| // =========================================================== | |
| module.exports = { | |
| lookup: function (domain, family, callback) { | |
| // parse arguments | |
| if (arguments.length === 2) { |
This project:
starting out:
mkdir browser-npm && cd browser-npm
npm install npm
browserify makes this possible for many modules, but the browser is a different environment (ex: no file system access) so we're going to need a few things if we want to run just anything:
1- browser versions of the native modules
from browser-resolve 1.0.1 index.js
// paths is mutated
// load shims from first package.json file found
function load_shims(paths, cb) {
// identify if our file should be replaced per the browser field
// original filename|id -> replacement
var shims = {};
(function next() {[kumavis:...opment/Node/node-browserify]$ npm list
npm WARN unmet dependency /Users/kumavis/Dropbox/Development/Node/node-browserify/node_modules/tap/node_modules/glob requires inherits@'1' but will load
npm WARN unmet dependency /Users/kumavis/Dropbox/Development/Node/node-browserify/node_modules/tap/node_modules/inherits,
npm WARN unmet dependency which is version 2.0.0
browserify@2.17.2 /Users/kumavis/Dropbox/Development/Node/node-browserify
├─┬ backbone@0.9.10
│ └── underscore@1.4.4
├─┬ browser-pack@0.9.1
│ ├─┬ combine-source-map@0.1.2
filesystem-browserify implements: 7 attributes
createReadStream
createWriteStream
readFile
readdir
rename
unlink
writeFile
fresh clone of voxel-gist [https://github.com/maxogden/voxel-gist]
[kumavis:...Development/Node/voxel-gist]$ npm install
npm http GET https://registry.npmjs.org/ecstatic/0.3.2
npm http GET https://registry.npmjs.org/jsonp/0.0.3
npm http GET https://registry.npmjs.org/javascript-editor/0.0.1
npm http GET https://registry.npmjs.org/snuggie/0.0.4
npm http GET https://registry.npmjs.org/uglify-js/2.2.3