Forráskód Böngészése

making sure local tsc is used, updating dependencies

Raanan Weber 7 éve
szülő
commit
bb4ae1287d
2 módosított fájl, 25 hozzáadás és 18 törlés
  1. 7 1
      Tools/Publisher/index.js
  2. 18 17
      Tools/Publisher/package.json

+ 7 - 1
Tools/Publisher/index.js

@@ -8,6 +8,8 @@ let basePath = '../../dist/preview release';
 // This can be changed when we have a new major release.
 let minimumDependency = '>=3.2.0-alpha';
 
+process.env.PATH += (path.delimiter + path.join(__dirname, 'node_modules', '.bin'));
+
 let packages = [
     {
         name: 'core',
@@ -229,7 +231,11 @@ function processViewer(package, version) {
 
     // build the viewer
     console.log("executing " + 'tsc -p ' + projectPath);
-    shelljs.exec('tsc -p ' + projectPath);
+
+    let tscCompile = shelljs.exec('tsc -p ' + projectPath);
+    if (tscCompile.code !== 0) {
+        throw new Error("tsc compilation failed");
+    }
 
     let packageJson = require(buildPath + '/package.json');
 

+ 18 - 17
Tools/Publisher/package.json

@@ -1,19 +1,20 @@
 {
-  "name": "banylonjs-publisher",
-  "version": "1.0.0",
-  "description": "Publishing babylon's packages automatically",
-  "main": "index.js",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "author": "Raanan Weber",
-  "license": "ISC",
-  "dependencies": {
-    "fs-extra": "^5.0.0",
-    "prompt": "^1.0.0",
-    "shelljs": "^0.7.8"
-  },
-  "devDependencies": {
-    "gulp": "^3.9.1"
-  }
+    "name": "banylonjs-publisher",
+    "version": "1.0.0",
+    "description": "Publishing babylon's packages automatically",
+    "main": "index.js",
+    "scripts": {
+        "test": "echo \"Error: no test specified\" && exit 1"
+    },
+    "author": "Raanan Weber",
+    "license": "ISC",
+    "dependencies": {
+        "fs-extra": "^5.0.0",
+        "prompt": "^1.0.0",
+        "shelljs": "^0.7.8",
+        "typescript": "^2.9.2"
+    },
+    "devDependencies": {
+        "gulp": "^4.0.0"
+    }
 }