Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alloy-compiler

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alloy-compiler - npm Package Compare versions

Comparing version 0.1.4 to 0.2.0

11

CHANGELOG.md

@@ -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 @@

37

lib/compilers/component.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc