generator-ts-np
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -7,78 +7,77 @@ 'use strict'; | ||
module.exports = class extends Generator { | ||
prompting() { | ||
// Have Yeoman greet the user. | ||
this.log(yosay( | ||
'Scaffold your next node package with ' + chalk.red('ts-np') + ' generator!' | ||
)); | ||
prompting() { | ||
// Have Yeoman greet the user. | ||
this.log(yosay( | ||
'Scaffold your next node package with ' + chalk.red('ts-np') + ' generator!' | ||
)); | ||
const prompts = [{ | ||
type: 'input', | ||
name: 'packageName', | ||
message: 'Package Name', | ||
default: this.appname | ||
}, { | ||
type: 'input', | ||
name: 'packageDescription', | ||
message: 'Package Description', | ||
}, { | ||
type: 'input', | ||
name: 'githubUsername', | ||
message: 'Github Username', | ||
store: true | ||
}, { | ||
type: 'input', | ||
name: 'githubRepository', | ||
message: 'Github Repository Name', | ||
default: this.appname | ||
}, { | ||
type: 'input', | ||
name: 'email', | ||
message: 'Your Email', | ||
store: true | ||
}, { | ||
type: 'input', | ||
name: 'twitterUsername', | ||
message: 'Twitter Username without @', | ||
store: true | ||
}, { | ||
type: 'input', | ||
name: 'fullName', | ||
message: 'Your full name to appear in README', | ||
store: true | ||
}]; | ||
const prompts = [{ | ||
type: 'input', | ||
name: 'packageName', | ||
message: 'Package Name', | ||
default: this.appname | ||
}, { | ||
type: 'input', | ||
name: 'packageDescription', | ||
message: 'Package Description' | ||
}, { | ||
type: 'input', | ||
name: 'githubUsername', | ||
message: 'Github Username', | ||
store: true | ||
}, { | ||
type: 'input', | ||
name: 'githubRepository', | ||
message: 'Github Repository Name', | ||
default: this.appname | ||
}, { | ||
type: 'input', | ||
name: 'email', | ||
message: 'Your Email', | ||
store: true | ||
}, { | ||
type: 'input', | ||
name: 'twitterUsername', | ||
message: 'Twitter Username without @', | ||
store: true | ||
}, { | ||
type: 'input', | ||
name: 'fullName', | ||
message: 'Your full name to appear in README', | ||
store: true | ||
}]; | ||
return this.prompt(prompts).then(props => { | ||
// To access props later use this.props.someAnswer; | ||
this.props = props; | ||
}); | ||
} | ||
return this.prompt(prompts).then(props => { | ||
// To access props later use this.props.someAnswer; | ||
this.props = props; | ||
}); | ||
} | ||
writing() { | ||
this.fs.copyTpl( | ||
this.templatePath('render/**'), | ||
this.destinationPath(), { | ||
packageName: this.props.packageName, | ||
packageDescription: this.props.packageDescription, | ||
githubUsername: this.props.githubUsername, | ||
githubRepository: this.props.githubRepository, | ||
email: this.props.email, | ||
twitterUsername: this.props.twitterUsername, | ||
fullName: this.props.fullName | ||
} | ||
); | ||
writing() { | ||
this.fs.copyTpl( | ||
this.templatePath('render/**'), | ||
this.destinationPath(), { | ||
packageName: this.props.packageName, | ||
packageDescription: this.props.packageDescription, | ||
githubUsername: this.props.githubUsername, | ||
githubRepository: this.props.githubRepository, | ||
email: this.props.email, | ||
twitterUsername: this.props.twitterUsername, | ||
fullName: this.props.fullName | ||
} | ||
); | ||
this.fs.copy( | ||
this.templatePath('static/**'), | ||
this.destinationPath(), { globOptions: { dot: true } } | ||
); | ||
this.fs.copy( | ||
this.templatePath('static/**'), | ||
this.destinationPath(), {globOptions: {dot: true}} | ||
); | ||
} | ||
} | ||
install() { | ||
this.installDependencies({ | ||
npm: false, | ||
bower: false, | ||
yarn: true | ||
}); | ||
} | ||
install() { | ||
this.installDependencies({ | ||
npm: false, | ||
bower: false, | ||
yarn: true | ||
}); | ||
} | ||
}; |
{ | ||
"name": "generator-ts-np", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Yeoman Generator For Building Node Packages With Typescript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/vajahath/generator-ts-np#readme", |
# generator-ts-np | ||
Yeoman Generator For Building Node Packages With Typescript. | ||
> :warning: This package is in Beta. You are warned. | ||
> :warning: This package is in Beta. You are warned! | ||
![TS-NP generator](https://raw.githubusercontent.com/vajahath/generator-ts-np/master/media/logo.png) | ||
## Why? | ||
- Inspired from [Typescript's own guide for node](https://github.com/Microsoft/TypeScript-Node-Starter#typescript-node-starter). | ||
- Lint rules adopted from [Google APIs Node.js Client Repo](https://github.com/google/google-auth-library-nodejs) which ensures higher code quality. | ||
- Pre-commit hooks for linters. | ||
- Vscode integration. | ||
- Integrated, fully configured mocha testing environment. | ||
- Scaffolds readme with all essential badges and stuffs. | ||
- Familiar directory structure. | ||
## Install | ||
@@ -9,0 +18,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8154
29