generator-ts-np
Advanced tools
Comparing version 0.0.2 to 0.0.8
@@ -7,83 +7,78 @@ '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 with @', | ||
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('render/.*'), | ||
this.destinationPath() | ||
); | ||
this.fs.copy( | ||
this.templatePath('static/**'), | ||
this.destinationPath(), { globOptions: { dot: true } } | ||
); | ||
this.fs.copy( | ||
this.templatePath('static/**/*'), | ||
this.destinationPath() | ||
); | ||
} | ||
} | ||
install() { | ||
this.installDependencies({ | ||
npm: false, | ||
bower: false, | ||
yarn: true | ||
}); | ||
} | ||
}; | ||
install() { | ||
this.installDependencies({ | ||
npm: false, | ||
bower: false, | ||
yarn: true | ||
}); | ||
} | ||
}; |
{ | ||
"name": "<%= packageName %>", | ||
"version": "0.0.2", | ||
"description": "<%= packageDescription %>", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "./node_modules/.bin/tsc", | ||
"lint": "./node_modules/.bin/tslint -c ./tslint.json -p ./tsconfig.json -t stylish ./src/**/*.ts --fix" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/<%= githubUsername %>/<%= githubRepository %>.git" | ||
}, | ||
"author": "Name <<%= email %>> (<%= twitterUsername %>)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/<%= githubUsername %>/<%= githubRepository %>/issues" | ||
}, | ||
"homepage": "https://github.com/<%= githubUsername %>/<%= githubRepository %>#readme", | ||
"dependencies": { | ||
"lme": "^1.5.3" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^8.0.5", | ||
"tslint": "^5.4.3", | ||
"typescript": "^2.4.1", | ||
"pre-commit": "^1.2.2" | ||
}, | ||
"pre-commit": [ | ||
"lint" | ||
] | ||
} | ||
"name": "<%= packageName %>", | ||
"version": "0.0.1", | ||
"description": "<%= packageDescription %>", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"start": "npm run build && npm run watch", | ||
"build": "./node_modules/.bin/tsc", | ||
"lint": "./node_modules/.bin/prettier --use-tabs --tab-width 4 --write src/**/* && ./node_modules/.bin/tslint -c ./tslint.json -p ./tsconfig.json -t stylish --fix ./src/**/*", | ||
"test": "./node_modules/.bin/cross-env NODE_ENV=test ./node_modules/.bin/mocha tests/ --compilers ts:ts-node/register,tsx:ts-node/register --recursive --reporter spec", | ||
"test-watch": "./node_modules/.bin/cross-env NODE_ENV=test ./node_modules/.bin/mocha tests/ --compilers ts:ts-node/register,tsx:ts-node/register --recursive --reporter spec --watch", | ||
"lint-noFix": "./node_modules/.bin/prettier --use-tabs --tab-width 4 src/**/* && ./node_modules/.bin/tslint -c ./tslint.json -p ./tsconfig.json -t stylish ./src/**/*", | ||
"preCommit-msg": "echo 'Precommit checks ...' && exit 0", | ||
"watch": "concurrently -k -p \"[{name}]\" -n \"TypeScript\" -c \"blue\" \"npm run watch-ts\"", | ||
"watch-ts": "tsc -w", | ||
"serve": "./node_modules/.bin/nodemon dist/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/<%= githubUsername %>/<%= githubRepository %>.git" | ||
}, | ||
"author": "Name <<%= email %>> (https://twitter.com/<%= twitterUsername %>)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/<%= githubUsername %>/<%= githubRepository %>/issues" | ||
}, | ||
"homepage": "https://github.com/<%= githubUsername %>/<%= githubRepository %>#readme", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/chai": "^4.0.1", | ||
"@types/mocha": "^2.2.41", | ||
"@types/node": "^8.0.5", | ||
"chai": "^4.1.0", | ||
"concurrently": "^3.5.0", | ||
"cross-env": "^5.0.1", | ||
"mocha": "^3.4.2", | ||
"pre-commit": "^1.2.2", | ||
"prettier": "^1.5.3", | ||
"ts-node": "^3.3.0", | ||
"tslint": "^5.5.0", | ||
"typescript": "^2.4.2", | ||
"nodemon": "^1.11.0" | ||
}, | ||
"pre-commit": [ | ||
"preCommit-msg", | ||
"lint-noFix" | ||
] | ||
} |
# <%= packageName %> | ||
<%= packageDescription %> | ||
Tell the world you are using TypeScript: | ||
[![Built with generator-ts-np](https://img.shields.io/badge/Built%20with-TypeScript-2699ad.svg)](https://github.com/vajahath/generator-ts-np) | ||
[![npm](https://img.shields.io/npm/v/<%= packageName %>.svg)]() | ||
[![Travis](https://img.shields.io/travis/<%= githubUsername %>/<%= githubRepository %>.svg)]() | ||
[![styled with prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[![npm](https://img.shields.io/npm/dt/<%= packageName %>.svg)]() | ||
[![Built with generator-ts-np](https://img.shields.io/badge/scaffolding-ts_np-2699ad.svg)](https://github.com/vajahath/generator-ts-np) | ||
![](media/cat-tech-support.jpg) | ||
## Install | ||
``` | ||
npm i --save <%= packageName %> | ||
``` | ||
## How it works? | ||
Optional | ||
## Usage | ||
Describe usage | ||
## Change log | ||
brief change log | ||
*Optionally in the end, mark the version of generator used:* [![used version of ts-np generator](https://img.shields.io/badge/ts--np-v1.0.0-555555.svg?style=flat-square)](https://github.com/vajahath/generator-ts-np) | ||
## Licence | ||
MIT © [<%= fullName %>](https://twitter.com/<%= twitterUsername %>) |
106
package.json
{ | ||
"name": "generator-ts-np", | ||
"version": "0.0.2", | ||
"description": "Yeoman Generator For Building Node Packages With Typescript", | ||
"homepage": "https://github.com/vajahath/generator-ts-np#readme", | ||
"author": "Vajahath Ahmed <vajuoff.1@gmail.com> (https://twitter.com/vajahath7)", | ||
"files": [ | ||
"generators" | ||
], | ||
"main": "index.js", | ||
"keywords": [ | ||
"yeoman-generator", | ||
"typescript", | ||
"yeoman-generator" | ||
], | ||
"devDependencies": { | ||
"yeoman-test": "^1.6.0", | ||
"yeoman-assert": "^3.0.0", | ||
"coveralls": "^2.13.1", | ||
"nsp": "^2.6.3", | ||
"eslint": "^4.1.0", | ||
"eslint-config-xo-space": "^0.16.0", | ||
"jest": "^19.0.2", | ||
"jest-cli": "^20.0.0" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1 && jest", | ||
"prepublish": "nsp check", | ||
"pretest": "eslint . --fix" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/vajahath/generator-ts-np.git" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/vajahath/generator-ts-np/issues" | ||
}, | ||
"dependencies": { | ||
"yeoman-generator": "^1.0.0", | ||
"chalk": "^1.1.3", | ||
"yosay": "^2.0.0" | ||
}, | ||
"jest": { | ||
"testEnvironment": "node" | ||
}, | ||
"eslintConfig": { | ||
"extends": "xo-space", | ||
"env": { | ||
"jest": true, | ||
"node": true | ||
} | ||
} | ||
} | ||
"name": "generator-ts-np", | ||
"version": "0.0.8", | ||
"description": "Yeoman Generator For Building Node Packages With Typescript", | ||
"homepage": "https://github.com/vajahath/generator-ts-np#readme", | ||
"author": "Vajahath Ahmed <vajuoff.1@gmail.com> (https://twitter.com/vajahath7)", | ||
"files": [ | ||
"generators" | ||
], | ||
"main": "index.js", | ||
"keywords": [ | ||
"yeoman-generator", | ||
"typescript", | ||
"yeoman-generator" | ||
], | ||
"devDependencies": { | ||
"yeoman-test": "^1.6.0", | ||
"yeoman-assert": "^3.0.0", | ||
"coveralls": "^2.13.1", | ||
"nsp": "^2.6.3", | ||
"eslint": "^4.1.0", | ||
"eslint-config-xo-space": "^0.16.0", | ||
"jest": "^19.0.2", | ||
"jest-cli": "^20.0.0" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1 && jest", | ||
"prepublish": "nsp check", | ||
"pretest": "eslint . --fix" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/vajahath/generator-ts-np.git" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/vajahath/generator-ts-np/issues" | ||
}, | ||
"dependencies": { | ||
"yeoman-generator": "^1.0.0", | ||
"chalk": "^1.1.3", | ||
"yosay": "^2.0.0" | ||
}, | ||
"jest": { | ||
"testEnvironment": "node" | ||
}, | ||
"eslintConfig": { | ||
"extends": "xo-space", | ||
"env": { | ||
"jest": true, | ||
"node": true | ||
} | ||
} | ||
} |
# generator-ts-np | ||
Yeoman Generator For Building Node Packages With Typescript. | ||
> This package is in Alpha :warning: You are warned. | ||
> :warning: This package is in Alpha. You are warned. | ||
@@ -19,4 +19,3 @@ ![TS-NP generator](./media/logo.png) | ||
## Licence | ||
MIT © [Vajahath Ahmed](https://twitter.com/vajahath7) |
Sorry, the diff of this file is not supported yet
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
7433
6
76
20