-
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(generators): ng add support and cleanup (#13)
- Loading branch information
1 parent
d825dcf
commit 5d5e8df
Showing
22 changed files
with
126 additions
and
131 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
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
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,18 @@ | ||
import { | ||
chain, | ||
SchematicsException, | ||
externalSchematic, | ||
} from "@angular-devkit/schematics"; | ||
import { prerun, errorMissingPrefix } from '../utils'; | ||
import { Schema as ApplicationOptions } from "./schema"; | ||
|
||
export default function(options: ApplicationOptions) { | ||
if (!options.prefix) { | ||
throw new SchematicsException(errorMissingPrefix); | ||
} | ||
|
||
return chain([ | ||
prerun(options.prefix, true), | ||
externalSchematic("@nstudio/schematics", "xplat", options), | ||
]); | ||
} |
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,10 @@ | ||
export interface Schema { | ||
/** | ||
* Target platforms | ||
*/ | ||
platforms?: string; | ||
/** | ||
* The prefix to apply to generated selectors. | ||
*/ | ||
prefix?: string; | ||
} |
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,23 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema", | ||
"id": "ng-add", | ||
"title": "Add xplat to Workspace", | ||
"description": "NOTE: Does not work in the --dry-run mode", | ||
"type": "object", | ||
"properties": { | ||
"platforms": { | ||
"type": "string", | ||
"description": "Target platforms to support." | ||
}, | ||
"prefix": { | ||
"type": "string", | ||
"description": "The prefix to apply to xplat generated selectors.", | ||
"alias": "p" | ||
}, | ||
"skipFormat": { | ||
"description": "Skip formatting files", | ||
"type": "boolean", | ||
"default": false | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,18 +1,7 @@ | ||
/** | ||
* The following are variables shared across all platforms and apps | ||
* Shared across all platforms and apps | ||
* You may define a set of global variables accessible across entire workspace here | ||
*/ | ||
|
||
// could use a base theme here, for example: | ||
// @import '~@angular/material/theming'; | ||
|
||
/** | ||
* Why NativeScript scss variables here? | ||
* Because they cover some nice ground level variables. | ||
* You can use them for multi-platform development (web included). | ||
* See here: https://github.com/NativeScript/theme/blob/master/app/scss/_variables.scss | ||
* Although feel free to use your own base variables. | ||
*/ | ||
|
||
@import '~nativescript-theme-core/scss/variables'; | ||
|
||
// override any imported variables here... | ||
// @import '~@angular/material/theming'; |
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 @@ | ||
@import '~nativescript-theme-core/scss/mixins/index'; | ||
|
||
// create your own mixins here... |
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
// ios/android variables here... | ||
// for all {N} apps | ||
@import '~nativescript-theme-core/scss/variables'; | ||
|
||
// Override any imported variables here... |
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.