Skip to content

Commit

Permalink
0.3alpha21 - preliminary dependencies.noWeb
Browse files Browse the repository at this point in the history
  • Loading branch information
anodynos committed Feb 12, 2013
1 parent 72019fe commit ce46ce4
Show file tree
Hide file tree
Showing 21 changed files with 160 additions and 77 deletions.
10 changes: 5 additions & 5 deletions build/code/NodeRequirer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion build/code/config/uRequireConfigMasterDefaults.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions build/code/moduleManipulation/ModuleManipulator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions build/code/moduleManipulation/seekr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/code/paths/upath.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions build/code/process/Bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/code/process/BundleBase.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build/code/process/UModule.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 26 additions & 3 deletions build/code/templates/AlmondOptimizationTemplate.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/code/urequireCmd.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env node

/*!
* urequire - version 0.3.0alpha20
* Compiled on 2013-02-05
* urequire - version 0.3.0alpha21
* Compiled on 2013-02-13
* git://github.com/anodynos/urequire
* Copyright(c) 2013 Agelos Pikoulas (agelos.pikoulas@gmail.com )
* Licensed MIT http://www.opensource.org/licenses/mit-license.php
Expand Down
2 changes: 1 addition & 1 deletion build/code/utils/Logger.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var VERSION = '0.3.0alpha20'; //injected by grunt:concat
var VERSION = '0.3.0alpha21'; //injected by grunt:concat

// Generated by CoffeeScript 1.4.0
var Logger, _,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "urequire",
"description": "Module converter: write modular code once, convert to UMD and run/test on AMD (browser/requirejs) & nodejs.",
"version": "0.3.0alpha20",
"version": "0.3.0alpha21",
"homepage": "https://github.com/anodynos/urequire",
"author": {
"name": "Agelos Pikoulas",
Expand Down Expand Up @@ -41,7 +41,7 @@
"node": "*"
},
"dependencies": {
"lodash": "0.10.x",
"lodash": "*",
"underscore.string":"*",
"uberscore": ">=0.0.5",
"commander": "1.1.x",
Expand Down
10 changes: 5 additions & 5 deletions source/code/NodeRequirer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class NodeRequirer extends BundleBase
if @getRequireJSConfig().paths
requireJsConf.paths = {}
for pathName, pathEntries of @getRequireJSConfig().paths
if not _(pathEntries).isArray()
if not _.isArray(pathEntries)
pathEntries = [ pathEntries ]

requireJsConf.paths[pathName] or= []
Expand Down Expand Up @@ -224,7 +224,7 @@ class NodeRequirer extends BundleBase
try
loadedModule = @nodeRequire _modulePath
catch err
if err1 is undefined or not _(err.toString()).startsWith "Error: Cannot find module" # prefer to keep 'generic' errors in err1
if err1 is undefined or not _.startsWith(err.toString(), "Error: Cannot find module") # prefer to keep 'generic' errors in err1
err1 = err

l.debug 35, "FAILED: @nodeRequire '#{_modulePath}' \n err=\n", err
Expand Down Expand Up @@ -327,10 +327,10 @@ class NodeRequirer extends BundleBase
strDeps # type: [ 'String', '[]<String>' ]
callback # type: '()->'
)=>
if _(strDeps).isString() # String - synchronous call
if _.isString strDeps # String - synchronous call
return @loadModule new Dependency strDeps, @moduleNameBR
else
if _(strDeps).isArray() # we have an []<String>:
if _.isArray strDeps # we have an []<String>:
deps = [] # []<Dependency>

#isAllCached = true # not needed anymore
Expand All @@ -348,7 +348,7 @@ class NodeRequirer extends BundleBase

# todo: should we check cb, before wasting time requiring modules ?
# Or maybe it was intentional, for caching modules asynchronously.
if _(callback).isFunction()
if _.isFunction callback
callback.apply null, loadedDeps

# if isAllCached #load *synchronously* (matching RequireJS's behaviour, when all modules are already loaded/cached!)
Expand Down
Loading

0 comments on commit ce46ce4

Please sign in to comment.