-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I was wondering about the .. purpose(s) of rave.
I can see it's primary objective is to allow very easy development of modular (amd/cjs/es6) web apps where you don't have to worry about configuring any paths, packages, shims, etc. Npm/bower modules can be effortlessly required into the project. So that's all amazing.
However, is the intention to also make rave a generic module loader - a successor of require.js and curl.js? For example, I'm currently using require.js on some third party sites, which means I can't a) leak globals b) rely on any data-attributes c) I don't actually need the package.json/bower.json crawling - instead I want to actually pass in configuration myself - the way I would do it with curl/require.js, etc. Is this out of the question for rave? That's a pity, because Rave enables CJS/ES6 module loading + extension based plugins, plus it's customizable via rave extensions, etc.
If the answer is no - rave is just for developing projects that have package.json and where env is controlled - then I suppose an alternative modern loader is System.js - however in that case - what about building rave (package.json crawling, etc.) on top of System.js and uniting the efforts.
Finally. A slightly different question, which perhaps I should have posted as a separate issue. Would it be possible to write a rave extension that instead of crawling package.jsons would work against a different "API". In particular - it would know about the jspm.io API and how to load packages from there. E.g. if the code has require("cherrytree"); it would fetch the file from https://npm.jspm.io/cherrytree@0.2.1/router.js, and deal with all subsequent nested requires similarly to how it deals with them now but by crawling package.jsons in node_modules. It could even still crawl package.jsons via this jspm.io API https://npm.jspm.io/cherrytree@0.2.1/package.json.