cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lorinb...@apache.org
Subject [1/2] webworks commit: [CB-3370] Cleaning up metadata from platform split - Includes create script change to absolute paths
Date Mon, 13 May 2013 21:28:23 GMT
Updated Branches:
  refs/heads/future b13f11b3b -> dcfebe3b8


[CB-3370] Cleaning up metadata from platform split
- Includes create script change to absolute paths


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/95819520
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/95819520
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/95819520

Branch: refs/heads/future
Commit: 958195200db69ba9240d50f5dac68c12c4dd9660
Parents: b13f11b
Author: Jeffrey Heifetz <jheifetz@blackberry.com>
Authored: Fri Apr 19 13:25:57 2013 -0400
Committer: lorinbeer <lorin@adobe.com>
Committed: Mon May 13 14:00:31 2013 -0700

----------------------------------------------------------------------
 .gitignore                 |   28 +++++++++++++++++++++++++++-
 blackberry/.gitignore      |   26 --------------------------
 blackberry10/.npmignore    |    2 ++
 blackberry10/bin/create.js |   32 ++++++++++++++++----------------
 blackberry10/package.json  |   12 ++++++------
 5 files changed, 51 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/95819520/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 9b1cdef..655ce7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/95819520/blackberry/.gitignore
----------------------------------------------------------------------
diff --git a/blackberry/.gitignore b/blackberry/.gitignore
deleted file mode 100644
index a67abe6..0000000
--- a/blackberry/.gitignore
+++ /dev/null
@@ -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

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/95819520/blackberry10/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/.npmignore b/blackberry10/.npmignore
new file mode 100644
index 0000000..db4145c
--- /dev/null
+++ b/blackberry10/.npmignore
@@ -0,0 +1,2 @@
+.gitignore
+.gitkeep

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/95819520/blackberry10/bin/create.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/create.js b/blackberry10/bin/create.js
index e347741..14ee608 100644
--- a/blackberry10/bin/create.js
+++ b/blackberry10/bin/create.js
@@ -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");
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/95819520/blackberry10/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/package.json b/blackberry10/package.json
index 6862757..227df34 100644
--- a/blackberry10/package.json
+++ b/blackberry10/package.json
@@ -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":"*"
+  }
 }


Mime
View raw message