Permalink
Browse files

[CB-3370] Cleaning up metadata from platform split

- Includes create script change to absolute paths
  • Loading branch information...
1 parent b13f11b commit 958195200db69ba9240d50f5dac68c12c4dd9660 Jeffrey Heifetz committed with lorinbeer Apr 19, 2013
Showing with 51 additions and 49 deletions.
  1. +27 −1 .gitignore
  2. +0 −26 blackberry/.gitignore
  3. +2 −0 blackberry10/.npmignore
  4. +16 −16 blackberry10/bin/create.js
  5. +6 −6 blackberry10/package.json
View
@@ -1,3 +1,29 @@
-#Output files
+# OS X
+
+.DS_Store
+
+# Eclipse
+
+deliverables/
+.preprocessed/
+
+# Text Editor Tmp
+
+._*
+
+# Generated libraries
+
+build/
+dist/
+bin/node_modules
+bin/templates/project/lib
+example/
+ant-contrib-1.0b3.jar
*.o
*.a
+
+# OS X
+
+.DS_Store
+
+tags
View
@@ -1,26 +0,0 @@
-# OS X
-
-.DS_Store
-
-# Eclipse
-
-deliverables/
-.preprocessed/
-
-# Text Editor Tmp
-
-._*
-
-# Generated libraries
-
-build/
-dist/
-bin/node_modules
-bin/templates/project/lib
-example/
-
-# OS X
-
-.DS_Store
-
-tags
View
@@ -0,0 +1,2 @@
+.gitignore
+.gitkeep
View
@@ -29,17 +29,17 @@ var build,
fs = require("fs"),
wrench = require("wrench"),
jWorkflow = require("jWorkflow"),
- utils = require('./lib/utils'),
+ utils = require(path.join(__dirname, 'lib/utils')),
version = getVersion(),
project_path = process.argv[2],
app_id = process.argv[3],
bar_name = process.argv[4],
- template_project_dir = "/templates/project",
- modules_project_dir = "/../node_modules",
- framework_project_dir = "/../framework",
- build_dir = "build",
- update_dir = "lib/cordova." + version,
- js_src = "../javascript",
+ template_project_dir = path.join(__dirname, "templates", "project"),
+ modules_project_dir = path.join(__dirname, "..", "node_modules"),
+ framework_project_dir = path.join(__dirname, "..", "framework"),
+ build_dir = path.join(__dirname, "build"),
+ update_dir = path.join(project_path, "lib", "cordova." + version),
+ js_src = path.join(__dirname, "..", "javascript"),
js_path = "javascript",
js_basename = "cordova-" + version + ".js";
@@ -88,34 +88,34 @@ var build,
function copyJavascript() {
wrench.mkdirSyncRecursive(build_dir + "/" + js_path, 0777);
- utils.copyFile(__dirname + "/" + js_src + "/cordova.blackberry10.js", build_dir + "/" + js_path);
+ utils.copyFile(path.join(js_src, "cordova.blackberry10.js"), path.join(build_dir, js_path));
//rename copied cordova.blackberry10.js file
- fs.renameSync(build_dir + "/" + js_path + "/cordova.blackberry10.js", build_dir + "/" + js_path + "/" + js_basename);
+ fs.renameSync(path.join(build_dir, js_path, "cordova.blackberry10.js"), path.join(build_dir, js_path, js_basename));
}
function copyFilesToProject() {
// create project using template directory
wrench.mkdirSyncRecursive(project_path, 0777);
- wrench.copyDirSyncRecursive(__dirname + template_project_dir, project_path);
+ wrench.copyDirSyncRecursive(template_project_dir, project_path);
// change file permission for cordova scripts because ant copy doesn't preserve file permissions
wrench.chmodSyncRecursive(project_path + "/cordova", 0700);
//copy cordova-*version*.js to www
- utils.copyFile(build_dir + "/" + js_path + "/" + js_basename, project_path + "/www");
+ utils.copyFile(path.join(build_dir, js_path, js_basename), path.join(project_path, "www"));
//copy node modules to cordova build directory
wrench.mkdirSyncRecursive(project_path + "/cordova/node_modules", 0777);
- wrench.copyDirSyncRecursive(__dirname + modules_project_dir, project_path + "/cordova/node_modules");
+ wrench.copyDirSyncRecursive(modules_project_dir, path.join(project_path, "cordova", "node_modules"));
fs.chmodSync(project_path + "/cordova/node_modules/plugman/plugman.js", 0755);
//copy framework
- wrench.copyDirSyncRecursive(__dirname + framework_project_dir, project_path + "/cordova/framework");
+ wrench.copyDirSyncRecursive(framework_project_dir, path.join(project_path, "cordova", "framework"));
// save release
- wrench.mkdirSyncRecursive(project_path + "/" + update_dir, 0777);
- wrench.copyDirSyncRecursive(build_dir, project_path + "/" + update_dir);
+ wrench.mkdirSyncRecursive(update_dir, 0777);
+ wrench.copyDirSyncRecursive(build_dir, update_dir);
}
function updateProject() {
@@ -131,7 +131,7 @@ var build,
if (typeof bar_name !== "undefined") {
projectJson = require(path.resolve(project_path + "/project.json"));
projectJson.barName = bar_name;
- fs.writeFileSync(project_path + "/project.json", JSON.stringify(projectJson, null, 4) + "\n", "utf-8");
+ fs.writeFileSync(path.join(project_path, "project.json"), JSON.stringify(projectJson, null, 4) + "\n", "utf-8");
}
}
View
@@ -11,6 +11,9 @@
"type": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}],
+ "scripts": {
+ "test": "./node_modules/jake/bin/cli.js"
+ },
"dependencies": {
"jasmine-node": "1.0.7",
"jWorkflow": "*",
@@ -22,10 +25,7 @@
"wrench": "1.3.9",
"plugman": "git+https://github.com/blackberry/cordova-plugman.git#blackberry10"
},
- "files": [
- "node_modules",
- "README.md",
- "LICENSE",
- "lib"
- ]
+ "devDependencies": {
+ "jake":"*"
+ }
}

0 comments on commit 9581952

Please sign in to comment.