Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge V2 #130

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
41ad67a
Build boot.js script using a build script
kriskowal Aug 7, 2013
aae7a8d
Add support for compilers
kriskowal Aug 27, 2013
36e6b6e
Add support for translators
kriskowal Aug 27, 2013
14ab32e
Inherit translators and compilers from dependencies
kriskowal Aug 27, 2013
73ee93d
Add support for redirect patterns
kriskowal Aug 29, 2013
4102bd7
Fix main linkage for relative identifiers
kriskowal Sep 1, 2013
48118c0
Add tests for main property of package.json and fix for Node
Stuk Sep 11, 2013
aedbd9b
Anonymous require in boilerplate
kriskowal Sep 17, 2013
d790384
Support Node.js __filename __dirname
kriskowal Sep 17, 2013
4608598
Delete module text after compile
kriskowal Sep 17, 2013
35360a3
Use module.require that resolves relative ids
kriskowal Sep 17, 2013
94d2df0
Add package to require errors
kriskowal Sep 17, 2013
b0ad1f0
Fix overlays + compilers and redirects
kriskowal Sep 17, 2013
db829ed
Fix for setimmediate package
kriskowal Sep 17, 2013
6a1d9da
Normalize redirects
kriskowal Sep 17, 2013
4f91611
Remove support for directories configuration
kriskowal Sep 17, 2013
fba1c6a
Build boot.js script using a build script
kriskowal Aug 7, 2013
d5e214c
Add support for compilers
kriskowal Aug 27, 2013
0aed9bc
Add support for translators
kriskowal Sep 17, 2013
22ca861
Add support for translators
kriskowal Aug 27, 2013
e71af5a
Inherit translators and compilers from dependencies
kriskowal Aug 27, 2013
f798d7b
Anonymous require in boilerplate
kriskowal Sep 17, 2013
4675412
Support Node.js __filename __dirname
kriskowal Sep 17, 2013
1545834
Delete module text after compile
kriskowal Sep 17, 2013
4c902fc
Use module.require that resolves relative ids
kriskowal Sep 17, 2013
f01d483
Add package to require errors
kriskowal Sep 17, 2013
7dc8997
Fix overlays + compilers and redirects
kriskowal Sep 17, 2013
4d7ba0d
Normalize redirects
kriskowal Sep 17, 2013
bf8c055
Add support for redirect patterns
kriskowal Aug 29, 2013
7d940be
Per review: only capture last term of an extension
kriskowal Sep 17, 2013
4d68c0d
Merge branch 'drop-directories-support' into configurability
kriskowal Sep 20, 2013
348a2fc
Elide translator modules from build products
kriskowal Nov 19, 2013
0deff2d
Melt off Extensions and Path loaders
kriskowal Nov 19, 2013
9a91300
Fix loading of multi-extension JavaScript
kriskowal Nov 19, 2013
3317962
Fix loading of preload bundles
kriskowal Nov 19, 2013
9ab9b55
Add test for requiring a package's main module without .js extension
Stuk Nov 13, 2013
f4fa6d0
Add support for optimizers
kriskowal Nov 20, 2013
28d55e8
Move script injection module up one
kriskowal Nov 20, 2013
ab9a4bd
Merge master and the configurability omnibus
kriskowal Nov 20, 2013
ce0c134
Support optimizers and preprocessor packages
kriskowal Dec 3, 2013
946f708
Migrate to Jasminum and Browserify-style
kriskowal Feb 26, 2014
aee5c3f
Ensure that build products are consistent
kriskowal Feb 26, 2014
9e9c7ae
Move spec to test, to be consistent
kriskowal Feb 26, 2014
3eb2259
Remove old generated scripts
kriskowal Mar 20, 2014
376a381
Remove extraneous copyright from fixtures
kriskowal Mar 20, 2014
7c45244
JSHint review
kriskowal Mar 20, 2014
1992d61
Stray copyright boilerplate
kriskowal Mar 20, 2014
fba1337
Migrate to Jasminum Phantom
kriskowal Mar 20, 2014
89f7d60
Fix adhoc boot
kriskowal Mar 20, 2014
f9034f0
Move bin specific code into bin/mr
kriskowal Mar 20, 2014
a619407
Misc bug fixes
kriskowal Mar 20, 2014
627c8fc
Improve display name of module factories
kriskowal Mar 20, 2014
7bbaf2f
Style dependencies reading code
kriskowal Mar 20, 2014
4d2efd4
Expand informative properties of package.json
kriskowal Mar 20, 2014
4cc684e
Version 2.0.0
kriskowal Mar 20, 2014
e6d317a
Fix Jasminum dependency
kriskowal Mar 20, 2014
8749c5f
Version 2.0.1
kriskowal Mar 20, 2014
e55c473
Fix Mr/Jasminum/PhantomJS tests
kriskowal May 19, 2014
aa2e0fc
2.0.2
kriskowal May 19, 2014
bf75492
Fixes for booting
kriskowal May 19, 2014
4862178
2.0.3
kriskowal May 19, 2014
a8f6e63
Eliminate shared module cache for builder
kriskowal Aug 5, 2014
bbd9891
2.0.4
kriskowal Aug 5, 2014
975b794
Bind viaId on require.lookup
kriskowal Sep 5, 2014
cc2aa08
Factor merge and identifier modules
kriskowal Sep 5, 2014
60910b8
Resolve compiler identifiers
kriskowal Feb 6, 2015
b20f889
Switch sourceURL to new style
kriskowal Feb 6, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,20 @@
.DS_Store
lcov.info
lcov-report/
/node_modules
# It is necessary to explicate the ignorable node_modules because
# node_modules/mr is a checked-in symlink, necessary for resolving the
# Jasminum/PhantomJS cyclic dependency upon Mr.
/node_modules/.bin
/node_modules/colors
/node_modules/istanbul
/node_modules/jasminum
/node_modules/joey
/node_modules/jshint
/node_modules/mop-integration
/node_modules/optimist
/node_modules/q-io
/node_modules/q
/node_modules/qs
/node_modules/util
/node_modules/wd
/node_modules/websocket.io
2 changes: 2 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
**/node_modules/**
**/packages/**
**/spec/**
boot/boilerplate.js
boot.js
19 changes: 18 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,43 @@
"noarg": true,
"noempty": true,
"nonew": true,
"newcap": false,
"undef": true,
"unused": "paramsignore",
"trailing": true,
"indent": 4,
"boss": true,
"eqnull": true,
"node": true,
"browser": true,
"globals": {
"CustomEvent": true,
"WebSocket": false,
"location": true,
"console": false,
"alert": true,
"hasOwnProperty": true,

"phantom": true,

"require": false,
"exports": false,
"module": false,
"global": false,
"__dirname": false,
"__filename": false,

"WeakMap": true,
"Map": true,
"Set": true,
"URL": true,

"console": false
"describe": true,
"ddescribe": true,
"xdescribe": true,
"it": true,
"iit": true,
"xit": true,
"expect": true
}
}
2 changes: 1 addition & 1 deletion adhoc.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<script src="bootstrap.js" data-module="adhoc"></script>
<script src="boot.js" data-module="adhoc"></script>
</head>
<body>
<p>Open your browser&apos;s console.</p>
Expand Down
3 changes: 2 additions & 1 deletion adhoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* global -URL */

var URL = require("mini-url");
var URL = require("url");
var QS = require("qs");

var a = document.createElement("a");
Expand Down
2 changes: 0 additions & 2 deletions bin/mr

This file was deleted.

2 changes: 2 additions & 0 deletions bin/mr-phantom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require("../phantom/boot")();
29 changes: 29 additions & 0 deletions bin/mr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env node --harmony

var Require = require("../require");
var Optimist = require("optimist");
var URL = require("url");
var Q = require("q");
var FS = require("q-io/fs");

var argv = Optimist.argv;
var program = argv._.shift();

Require.findPackageLocationAndModuleId(program)
.then(function (info) {
return Require.loadPackage(info.location, {
})
.invoke("async", info.id);
}, function (error) {
var location = Require.filePathToLocation(program);
var directory = URL.resolve(location, "./");
var file = FS.relativeFromDirectory(directory, location);
var descriptions = {};
descriptions[directory] = Q({});
return Require.loadPackage(directory, {
descriptions: descriptions
})
.invoke("async", file);
})
.done();

31 changes: 31 additions & 0 deletions bin/mrs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env node

var optimist = require("optimist");
var build = require("../build");

var argv = optimist
.default("execute", "")
.alias("e", "execute")
.alias("h", "help")
.argv;

function usage() {
console.log("Usage: mrs <entry> [-e <expression>]");
console.log("");
console.log(" Creates a <script> from CommonJS modules");
process.exit(-1);
}

if (argv.help) {
usage();
}
if (argv._.length !== 1) {
usage();
}

var path = argv._[0];
build(path)
.then(function (bundle) {
console.log(bundle + argv.execute);
}).done();

Loading