-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Polymer/init
Add init command
- Loading branch information
Showing
4 changed files
with
24 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {Command} from './command'; | ||
import * as YeomanEnvironment from 'yeoman-environment'; | ||
import * as PolymerInit from 'generator-polymer-init/generators/app'; | ||
|
||
export class InitCommand implements Command { | ||
name = 'init'; | ||
|
||
description = 'Initializes a Polymer project'; | ||
|
||
args = []; | ||
|
||
run(options): Promise<any> { | ||
return new Promise((resolve, reject) => { | ||
let env = new YeomanEnvironment(); | ||
env.register(require.resolve('generator-polymer-init'), 'polymer-init:app'); | ||
env.run('polymer-init', {}, () => resolve()); | ||
}); | ||
} | ||
} |
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