component-builder
Advanced tools
Comparing version 0.11.0 to 0.11.1
0.11.1 / 2013-12-30 | ||
================== | ||
* fix main support | ||
0.11.0 / 2013-12-29 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -820,6 +820,23 @@ /** | ||
function register(builder, file, js){ | ||
file = builder.root | ||
? builder.config.name + '/' + file | ||
: builder.basename + '/' + file; | ||
var main = builder.config.main; | ||
var orig = file; | ||
// strip ./ | ||
if ('./' == file.slice(0, 2)) file = file.slice(2); | ||
// rewrite main to index.js | ||
// so that require() still grabs | ||
// the correct file without aliases | ||
if (file == main) file = 'index.js'; | ||
// determine prefix | ||
// TODO: should always be name / version combo | ||
var prefix = builder.root | ||
? builder.config.name | ||
: builder.basename; | ||
// prefix | ||
file = prefix + '/' + file; | ||
js = requires(js, function(require){ | ||
@@ -833,3 +850,3 @@ var deps = builder.config.dependencies || {}; | ||
if (builder.sourceUrls) { | ||
js = JSON.stringify(js + '//@ sourceURL=' + file); | ||
js = JSON.stringify(js + '//@ sourceURL=' + prefix + '/' + orig); | ||
js = js.replace(/\\n/g, '\\n\\\n'); | ||
@@ -836,0 +853,0 @@ return 'require.register("' + file + '", Function("exports, require, module",\n' |
{ | ||
"name": "component-builder", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Component build tool", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28484
828