-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: support refactored schematics package
- Loading branch information
1 parent
5a8920a
commit 1085850
Showing
8 changed files
with
65 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
.idea/ | ||
.gitignore | ||
.travis.yml | ||
Makefile | ||
Makefile | ||
|
||
# source | ||
**/*.ts | ||
*.ts | ||
|
||
# definitions | ||
!**/*.d.ts | ||
!*.d.ts |
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,5 +1,8 @@ | ||
import { Input } from '../commands'; | ||
|
||
export abstract class AbstractAction { | ||
public abstract async handle(inputs?: Input[], options?: Input[]): Promise<void>; | ||
public abstract async handle( | ||
inputs?: Input[], | ||
options?: Input[], | ||
): Promise<void>; | ||
} |
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,14 +1,19 @@ | ||
import { Input } from '../commands'; | ||
import { AbstractPackageManager, PackageManagerFactory } from '../lib/package-managers'; | ||
import { | ||
AbstractPackageManager, | ||
PackageManagerFactory, | ||
} from '../lib/package-managers'; | ||
import { AbstractAction } from './abstract.action'; | ||
|
||
export class AddAction extends AbstractAction { | ||
public async handle(inputs: Input[]) { | ||
const manager: AbstractPackageManager = await PackageManagerFactory.find(); | ||
const libraryInput: Input = inputs.find((input) => input.name === 'library') as Input; | ||
if (!!libraryInput) { | ||
const libraryInput: Input = inputs.find( | ||
input => input.name === 'library', | ||
) as Input; | ||
if (libraryInput) { | ||
const library: string = libraryInput.value as string; | ||
await manager.addProduction([ library ], 'latest'); | ||
await manager.addProduction([library], 'latest'); | ||
} | ||
} | ||
} |
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