-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(cli): add Alloy app to create menu #14387
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
+286
−181
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1c1e0ef
feat(cli): add Alloy app to create menu
m1ga 2606200
refactor code
m1ga 32a647d
fix lint issue
m1ga a1433c2
fix: add alloy check, move app_alloy to alloy, use numbers in create
m1ga 13a8645
fix: try/catch around alloy create
m1ga fd2b33c
Merge branch 'main' into cliAlloy
m1ga 243e49f
Update cli/commands/create.js
m1ga 1ccaf4d
Update cli/commands/create.js
m1ga 2aff15f
fix: move check into success branch
m1ga 3cce7bc
move success after error
m1ga 103024a
move success after error
m1ga e6c199c
Merge branch 'cliAlloy' of https://github.com/tidev/titanium-sdk into…
m1ga 03d8f1b
remove duplicated message
m1ga 6c6c352
optimize success message
m1ga ae9a4c7
fix linter
m1ga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| /** | ||
| * @overview | ||
| * Logic for creating new Titanium apps. | ||
| * | ||
| * @copyright | ||
| * Copyright TiDev, Inc. 04/07/2022-Present | ||
| * | ||
| * @license | ||
| * Licensed under the terms of the Apache Public License | ||
| * Please see the LICENSE included with this distribution for details. | ||
| */ | ||
|
|
||
| import { BaseAppCreator } from './base_app.js'; | ||
| import { execSync } from 'node:child_process'; | ||
|
|
||
| /** | ||
| * Creates application projects. | ||
| * | ||
| * @module lib/creators/app | ||
| */ | ||
| export class AppCreator extends BaseAppCreator { | ||
| /** | ||
| * Constructs the app creator. | ||
| * @class | ||
| * @classdesc Creates an app project. | ||
| * @constructor | ||
| * @param {Object} logger - The logger instance | ||
| * @param {Object} config - The CLI config | ||
| * @param {Object} cli - The CLI instance | ||
| */ | ||
| constructor(logger, config, cli) { // eslint-disable-line no-unused-vars | ||
| super(logger, config, cli, { | ||
| title: 'Titanium App (Alloy)', | ||
| titleOrder: 2, | ||
| type: 'alloy' | ||
| }); | ||
| } | ||
|
|
||
| init() { | ||
| // check if alloy is installed | ||
| try { | ||
| execSync('alloy --version'); | ||
| } catch (err) { | ||
| throw new Error('Alloy is not installed'); | ||
| } | ||
| return super.init(); | ||
| } | ||
| } | ||
|
|
||
| export default AppCreator; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.