Skip to content

Commit

Permalink
修复当传入的js文件不属于合法的cmd格式的判断,fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
guilipan committed Mar 30, 2015
1 parent 6d09b0c commit a269706
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (typeof define === "function" && define.cmd) {

0.0.7 => 将transport的实现方法替换为cmd-util的抽象语法树方式

0.0.9 => 修复当传入的js文件不属于合法的cmd格式的判断
0.0.10 => 修复当传入的js文件不属于合法的cmd格式的判断
## Licence

MIT
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = function (options) {
var contents = file.contents.toString();


transport.call(this,file, options)
transport.call(this, file, options)

this.push(file);

Expand Down Expand Up @@ -85,7 +85,8 @@ module.exports = function (options) {
var oldAstSeaModule = ast.parseFirst(file.contents.toString())//{id: 'id', dependencies: ['a'], factory: factoryNode}

if (!oldAstSeaModule) {
this.emit("error",new PluginError("gulp-seajs-transport", "the seajs file " + file.path + " is not valid"))
this.emit("error", new PluginError("gulp-seajs-transport", "the seajs file " + file.path + " is not valid"))
return
}

var newId = parseId(file.path, options.base)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-seajs-transport",
"version": "0.0.9",
"version": "0.0.10",
"description": "transport seajs modules gulp plugin",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit a269706

Please sign in to comment.