ringo / ringojs

RingoJS is a JavaScript platform built on the JVM and optimized for server-side applications.
https://ringojs.org
Apache License 2.0
838 stars 101 forks source link

Attack the file, fs-base, ringo/file, ringo/fileutils module zoo #34

Closed earl closed 14 years ago

earl commented 14 years ago

a low-hanging fruit may be to start with getting rid of the global 'file' module, usage of which seems to be limited:

$ rgrep "'file'" apps/ modules/ src/
apps/demo/config.js:var resolve = require('file').resolve;
modules/ringo/admin/create.js:var file = require('file');
modules/ringo/fileutils.js:var fs = require('file');
modules/packages.js:var fs = require('file');

Unfortunately, file provides some facilities not yet available in fs-base (Hannes mentioned the missing text-mode open), so that will have to be looked into.

hns commented 14 years ago

i'd propose the following:

basically, just bring everything up to current commonjs proposals.

hns commented 14 years ago

adding wip.hannesw

hns commented 14 years ago

started new fs-cleanup branch in my repo:

http://github.com/hns/ringojs/tree/fs-cleanup

Current state: there's now a new "fs" module based on "fs-base" that implements more or less the functionality we had in "file", but updated to current Filesystem/A proposal.

The file tests have been modified to use "fs" and all pass, but there are probably some oversights left.

earl commented 14 years ago

fs-cleanup was merged in 24879b5d6de25c260f8f820c51f5aa521badb844, so this issue is now fixed.