-
-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use external compiler package #952
base: next
Are you sure you want to change the base?
Conversation
man, this was ugly
New dependencies added: alloy-compilerAuthor: Axway Appcelerator Description: Compiler for Alloy components
|
Created | 4 months ago |
Last Updated | 3 days ago |
License | Apache-2.0 |
Maintainers | 1 |
Releases | 7 |
Direct Dependencies | @babel/code-frame , chmodr , colors , fs-extra , global-paths , jsonlint , lodash , moment , resolve and xmldom |
Keywords | alloy, common and utils |
README
alloy-utils
Alloy utility library
Installation
npm i alloy-utils
Usage
const {
utils, // Utility functions
logger, // Alloy logger
constants, // Constants used in Alloy
platforms, // Platform information
tiapp, // Utils to work with tiapp.xml
tssGrammar // TSS grammar defintion
} = require('alloy-utils');
strip-ansi
Author: Sindre Sorhus
Description: Strip ANSI escape codes from a string
Homepage: https://github.com/chalk/strip-ansi#readme
Created | over 6 years ago |
Last Updated | 6 months ago |
License | MIT |
Maintainers | 2 |
Releases | 16 |
Direct Dependencies | ansi-regex |
Keywords | strip, trim, remove, ansi, styles, color, colour, colors, terminal, console, string, tty, escape, formatting, rgb, 256, shell, xterm, log, logging, command-line and text |
README
strip-ansi
Strip ANSI escape codes from a string
Install
$ npm install strip-ansi
Usage
const stripAnsi = require('strip-ansi');
stripAnsi('\u001B[4mUnicorn\u001B[0m');
//=> 'Unicorn'
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
//=> 'Click'
strip-ansi for enterprise
Available as part of the Tidelift Subscription.
The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
Related
- strip-ansi-cli - CLI for this module
- strip-ansi-stream - Streaming version of this module
- has-ansi - Check if a string has ANSI escape codes
- ansi-regex - Regular expression for matching ANSI escape codes
- chalk - Terminal string styling done right
Maintainers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, some comments but only the version number comment is required. Incredible work @janvennemann!
Moving on to do some more thorough testing
path.join(paths.resources, titaniumFolder, 'alloy'), | ||
{ rootDir: paths.project, restrictionPath: restrictionPath } | ||
// NOTE: copies `alloy-utils/lib/constants.js` into `<project-dir>/Resources/<platform>/alloy` | ||
U.copyFileSync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a huge deal as it's only the constants file, but we'd lose the restrictionPath
filtering by just using copyFileSync
here
}); | ||
let finalCode = code; | ||
const relativeOutfile = path.relative(compileConfig.dir.project, componentOutputPath); | ||
if (compileConfig.sourcemap !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self to check debugging in studio/vscode
@@ -1161,13 +816,11 @@ function optimizeCompiledCode(alloyConfig, paths) { | |||
}); | |||
} | |||
|
|||
// TODO: Remove once @titanium-sdk/babel-preset-app is in place |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an ALOY ticket to handle, or will it be done at the SDK level?
JIRA: https://jira.appcelerator.org/browse/ALOY-1725
This rips out everything that is relating to compiling Alloy components and moves it into a new package. The goal is to get a reusable compiler package that can be used across different projects. A first example of this is the alloy-loader.
Overview of the changes this PR contains:
mobileweb
as a platform.