You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2014/04/24 23:13:26 UTC
[3/7] git commit: CB-6280: plugman publish now publishes doc/index.md
CB-6280: plugman publish now publishes doc/index.md
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/967f1164
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/967f1164
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/967f1164
Branch: refs/heads/browserify
Commit: 967f1164e182d65b4f9c5e2d9ccd415546b9589a
Parents: b156a69
Author: Steven Gill <st...@gmail.com>
Authored: Tue Apr 22 17:49:10 2014 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Tue Apr 22 17:49:10 2014 -0700
----------------------------------------------------------------------
src/registry/manifest.js | 11 ++++++-----
src/registry/registry.js | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/967f1164/src/registry/manifest.js
----------------------------------------------------------------------
diff --git a/src/registry/manifest.js b/src/registry/manifest.js
index f6bcf07..54f74b6 100644
--- a/src/registry/manifest.js
+++ b/src/registry/manifest.js
@@ -73,19 +73,20 @@ function generatePackageJsonFromPluginXml(plugin_path) {
}
}
- //adding docs
+ //set docs_path to doc/index.md exists
var docs_path = path.resolve(plugin_path, 'doc/index.md');
- console.log(docs_path);
+ if(!(fs.existsSync(docs_path))){
+ //set docs_path to doc/en/index.md
+ docs_path = path.resolve(plugin_path, 'doc/en/index.md');
+ }
if(fs.existsSync(docs_path)){
- console.log("english docs exisit");
englishdoc = fs.readFileSync(docs_path, 'utf-8');
package_json.englishdoc = englishdoc;
- console.log(englishdoc);
}
// write package.json
var package_json_path = path.resolve(plugin_path, 'package.json');
- console.log('about to write package.json');
+ //console.log('about to write package.json');
fs.writeFileSync(package_json_path, JSON.stringify(package_json, null, 4), 'utf8');
return package_json;
});
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/967f1164/src/registry/registry.js
----------------------------------------------------------------------
diff --git a/src/registry/registry.js b/src/registry/registry.js
index d95d17e..e0d733d 100644
--- a/src/registry/registry.js
+++ b/src/registry/registry.js
@@ -148,7 +148,7 @@ module.exports = {
}).then(function() {
return Q.ninvoke(npm.commands, 'publish', args)
}).fin(function() {
- //fs.unlink(path.resolve(args[0], 'package.json'));
+ fs.unlink(path.resolve(args[0], 'package.json'));
});
});
},