-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schematics): app generator now includes Nx + xplat options
- Loading branch information
1 parent
87a9161
commit 0650c4f
Showing
14 changed files
with
411 additions
and
100 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,3 @@ | ||
{ | ||
"schematics": {} | ||
} |
This file contains 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 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,14 @@ | ||
import { Schema } from '../application/schema'; | ||
import { chain } from '@angular-devkit/schematics'; | ||
import { prerun, XplatHelpers } from '../../utils'; | ||
|
||
let packagesToRunXplat: Array<string> = []; | ||
export default function(options: Schema) { | ||
const externalChains = XplatHelpers.getExternalChainsForGenerator( | ||
options, | ||
'app', | ||
packagesToRunXplat | ||
); | ||
|
||
return chain([prerun(options, true), ...externalChains]); | ||
} |
This file contains 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,80 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema", | ||
"id": "xplatAppGen", | ||
"title": "Generate an xplat app", | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the app.", | ||
"alias": "n", | ||
"$default": { | ||
"$source": "argv", | ||
"index": 0 | ||
} | ||
}, | ||
"prefix": { | ||
"type": "string", | ||
"description": "The prefix to apply to generated selectors.", | ||
"alias": "p" | ||
}, | ||
"platforms": { | ||
"type": "string", | ||
"description": "Platforms." | ||
}, | ||
"framework": { | ||
"type": "string", | ||
"description": "Frontend framework.", | ||
"x-prompt": { | ||
"message": "Which frontend framework should it use?", | ||
"type": "list", | ||
"items": [ | ||
{ | ||
"value": "angular", | ||
"label": "angular [Angular app]" | ||
}, | ||
{ | ||
"value": "", | ||
"label": "none [vanilla app]" | ||
} | ||
] | ||
} | ||
}, | ||
"groupByName": { | ||
"description": "Group by app name (appname-platform) instead of the default (platform-appname)", | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"target": { | ||
"type": "string", | ||
"description": "The target to use with this generator." | ||
}, | ||
"npmScope": { | ||
"type": "string", | ||
"description": "The npm scope to use.", | ||
"alias": "wn" | ||
}, | ||
"routing": { | ||
"type": "boolean", | ||
"description": "Configure routing.", | ||
"default": false | ||
}, | ||
"setupSandbox": { | ||
"type": "boolean", | ||
"description": "Setup app as a sandbox for the workspace.", | ||
"default": false | ||
}, | ||
"useXplat": { | ||
"description": "Generate xplat supporting architecture", | ||
"type": "boolean", | ||
"default": true, | ||
"x-prompt": "Use xplat supporting architecture?" | ||
}, | ||
"skipInstall": { | ||
"type": "boolean", | ||
"description": "Skip installing dependencies.", | ||
"default": false | ||
} | ||
}, | ||
"required": [] | ||
} |
This file contains 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 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.