mirror of
https://github.com/apache/cordova-android.git
synced 2025-04-02 04:42:46 +08:00
Added commit 150cdfd, override arg for project template
Conflicts: bin/create
This commit is contained in:
parent
b1d8788506
commit
57bed98cf1
@ -47,7 +47,7 @@ function create() {
|
||||
args[2] == 'help' || args[2] == '-help' || args[2] == '/help')) {
|
||||
create.help();
|
||||
} else {
|
||||
create.run(args[2], args[3], args[4]);
|
||||
create.run(args[2], args[3], args[4], args[5]);
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
@ -35,17 +35,20 @@ var shell = require('shelljs'),
|
||||
* - `project_path` {String} Path to the new Cordova android project.
|
||||
* - `package_name`{String} Package name, following reverse-domain style convention.
|
||||
* - `project_name` {String} Project name.
|
||||
* - 'project_template_dir' {String} Path to project template (override).
|
||||
*/
|
||||
|
||||
module.exports.run = function(project_path, package_name, project_name) {
|
||||
module.exports.run = function(project_path, package_name, project_name, project_template_dir) {
|
||||
|
||||
var VERSION = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8');
|
||||
var project_template_dir = path.join(ROOT, 'bin', 'templates', 'project');
|
||||
|
||||
// Set default values for path, package and name
|
||||
project_path = typeof project_path !== 'undefined' ? project_path : "CordovaExample";
|
||||
package_name = typeof package_name !== 'undefined' ? package_name : 'my.cordova.project';
|
||||
project_name = typeof project_name !== 'undefined' ? project_name : 'CordovaExample';
|
||||
project_template_dir = typeof project_template_dir !== 'undefined' ?
|
||||
project_template_dir :
|
||||
path.join(ROOT, 'bin', 'templates', 'project');
|
||||
|
||||
var safe_activity_name = project_name.replace(/\W/, '');
|
||||
var package_as_path = package_name.replace(/\./g, path.sep);
|
||||
|
Loading…
x
Reference in New Issue
Block a user