component-builder
Advanced tools
Comparing version 0.4.2 to 0.5.0
0.5.0 / 2012-12-04 | ||
================== | ||
* add source url support. Closes #39 | ||
* fix url rewriting of css in sub-directories | ||
0.4.2 / 2012-11-06 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -9,2 +9,3 @@ | ||
, join = path.join | ||
, dirname = path.dirname | ||
, Batch = require('batch') | ||
@@ -95,2 +96,3 @@ , debug = require('debug')('component:builder') | ||
dep.copyAssetsTo(this.assetsDest); | ||
if (this.sourceUrls) dep.addSourceURLs(); | ||
}; | ||
@@ -110,2 +112,12 @@ | ||
/** | ||
* Enable "sourceURLs" in the build. | ||
* | ||
* @api public | ||
*/ | ||
Builder.prototype.addSourceURLs = function(){ | ||
this.sourceUrls = true; | ||
}; | ||
/** | ||
* Check if this build has deps. | ||
@@ -324,17 +336,17 @@ * | ||
* ./inherit -> component-inherit | ||
* | ||
* | ||
* ./animal | ||
* ./deps | ||
* ./inherit -> component-inherit | ||
* | ||
* | ||
* ./component-inherit | ||
* | ||
* | ||
* ./pet-list | ||
* ./deps | ||
* ./pet -> pet | ||
* | ||
* | ||
* ./user-list | ||
* ./deps | ||
* ./user -> user | ||
* | ||
* | ||
* ./boot | ||
@@ -648,5 +660,11 @@ * ./deps | ||
return 'require.register("' + file + '", function(module, exports, require){\n' | ||
+ js | ||
+ '\n});'; | ||
if (builder.sourceUrls) { | ||
return 'require.register("' + file + '", Function("module, exports, require",\n' | ||
+ JSON.stringify(js + '//@ sourceURL=' + file) | ||
+ '\n));'; | ||
} else { | ||
return 'require.register("' + file + '", function(module, exports, require){\n' | ||
+ js | ||
+ '\n});'; | ||
} | ||
} | ||
@@ -676,3 +694,3 @@ | ||
var name = normalize(builder.name); | ||
return join(builder.urlPrefix, '/', name, url); | ||
return join(builder.urlPrefix, '/', name, dirname(file), url); | ||
} | ||
@@ -679,0 +697,0 @@ |
{ | ||
"name": "component-builder", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"description": "Component build tool", | ||
@@ -12,3 +12,3 @@ "keywords": [ | ||
"component-require": "0.1.0", | ||
"batch": "0.1.1", | ||
"batch": "0.2.1", | ||
"rework": "0.7.0", | ||
@@ -15,0 +15,0 @@ "mkdirp": "0.3.4", |
19647
625
+ Addedbatch@0.2.1(transitive)
- Removed@isaacs/cliui@8.0.2(transitive)
- Removed@pkgjs/parseargs@0.11.0(transitive)
- Removedansi-colors@4.1.3(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedanymatch@3.1.3(transitive)
- Removedargparse@2.0.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbatch@0.1.1(transitive)
- Removedbinary-extensions@2.3.0(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedbraces@3.0.3(transitive)
- Removedbrowser-stdout@1.3.1(transitive)
- Removedcamelcase@6.3.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedchokidar@3.6.0(transitive)
- Removedcliui@8.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removeddecamelize@4.0.0(transitive)
- Removeddiff@5.2.0(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedescalade@3.2.0(transitive)
- Removedescape-string-regexp@4.0.0(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfind-up@5.0.0(transitive)
- Removedflat@5.0.2(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedfsevents@2.3.3(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedglob@10.4.5(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedhe@1.2.0(transitive)
- Removedis-binary-path@2.1.0(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedis-plain-obj@2.1.0(transitive)
- Removedis-unicode-supported@0.1.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@3.4.3(transitive)
- Removedjs-yaml@4.1.0(transitive)
- Removedlocate-path@6.0.0(transitive)
- Removedlog-symbols@4.1.0(transitive)
- Removedlru-cache@10.4.3(transitive)
- Removedminimatch@5.1.69.0.5(transitive)
- Removedminipass@7.1.2(transitive)
- Removedmocha@11.1.0(transitive)
- Removednormalize-path@3.0.0(transitive)
- Removedp-limit@3.1.0(transitive)
- Removedp-locate@5.0.0(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@1.11.1(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedreaddirp@3.6.0(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedserialize-javascript@6.0.2(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedshould@13.2.3(transitive)
- Removedshould-equal@2.0.0(transitive)
- Removedshould-format@3.0.3(transitive)
- Removedshould-type@1.4.0(transitive)
- Removedshould-type-adaptors@1.1.0(transitive)
- Removedshould-util@1.0.1(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedstrip-json-comments@3.1.1(transitive)
- Removedsupports-color@7.2.08.1.1(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedwhich@2.0.2(transitive)
- Removedworkerpool@6.5.1(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)
- Removedy18n@5.0.8(transitive)
- Removedyargs@17.7.2(transitive)
- Removedyargs-parser@21.1.1(transitive)
- Removedyargs-unparser@2.0.0(transitive)
- Removedyocto-queue@0.1.0(transitive)
Updatedbatch@0.2.1