alloy-compiler
Advanced tools
Comparing version
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.2.0](https://github.com/appcelerator/alloy-devkit/compare/v0.1.4...v0.2.0) (2020-03-03) | ||
### Features | ||
* pass file content in options ([a1ba8a0](https://github.com/appcelerator/alloy-devkit/commit/a1ba8a09aa46d404de7794b44aee9d2d1165e03d)) | ||
## [0.1.4](https://github.com/appcelerator/alloy-devkit/compare/v0.1.3...v0.1.4) (2020-02-27) | ||
@@ -8,0 +19,0 @@ |
@@ -31,8 +31,15 @@ const { constants: CONST, logger } = require('alloy-utils'); | ||
let hasView = true; | ||
let viewContent = ''; | ||
try { | ||
viewContent = this.fs.readFileSync(files.VIEW, 'utf-8'); | ||
} catch (e) { | ||
hasView = false; | ||
let hasView = false; | ||
let viewContent = options.viewContent; | ||
if (!viewContent) { | ||
try { | ||
viewContent = this.fs.readFileSync(files.VIEW, 'utf-8'); | ||
hasView = true; | ||
} catch (e) { | ||
if (e.code !== 'ENOENT') { | ||
throw e; | ||
} | ||
} | ||
} else { | ||
hasView = true; | ||
} | ||
@@ -56,12 +63,14 @@ if (hasView) { | ||
// process the controller code | ||
let controllerContent; | ||
try { | ||
controllerContent = this.fs.readFileSync(files.CONTROLLER, 'utf-8'); | ||
logger.info(' controller: "' | ||
+ path.relative(path.join(meta.basePath, CONST.DIR.CONTROLLER), files.CONTROLLER) + '"'); | ||
} catch (e) { | ||
if (e.code !== 'ENOENT') { | ||
throw e; | ||
let controllerContent = options.controllerContent; | ||
if (!controllerContent) { | ||
try { | ||
controllerContent = this.fs.readFileSync(files.CONTROLLER, 'utf-8'); | ||
} catch (e) { | ||
if (e.code !== 'ENOENT') { | ||
throw e; | ||
} | ||
} | ||
} | ||
logger.info(' controller: "' | ||
+ path.relative(path.join(meta.basePath, CONST.DIR.CONTROLLER), files.CONTROLLER) + '"'); | ||
const cCode = CU.loadController(files.CONTROLLER, controllerContent); | ||
@@ -68,0 +77,0 @@ let controllerCode = ''; |
{ | ||
"name": "alloy-compiler", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"description": "Compiler for Alloy components", | ||
@@ -22,3 +22,3 @@ "main": "lib/index.js", | ||
"@babel/types": "^7.8.3", | ||
"alloy-utils": "^0.1.4", | ||
"alloy-utils": "^0.2.0", | ||
"chmodr": "^1.2.0", | ||
@@ -35,3 +35,3 @@ "fs-extra": "^8.1.0", | ||
}, | ||
"gitHead": "ab6ac0759d5fdc8963f1d502482b7a295db3f5aa" | ||
"gitHead": "ef3bf708b0fe576429ed527e58320284ef360075" | ||
} |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
919744
0.05%23760
0.04%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
Updated