Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
generator-ts-np
Advanced tools
Yeoman Generator For Building Node Packages With Typescript.
:warning: This package is in Beta. You are warned!
This package helps you to scaffold a directory skeleton required to start writing an npm package in Typescript, which is fully configured and ready to contain your module logic. And finally, ready to publish.
Here you write your logic in Typescript and publish the compiled version of it - easily.
es5
. (which means the code runs in many versions of node)npm install -g generator-ts-np
yo ts-np
Here is what you get:
.
|-- media
| `-- cong.jpg
|-- package.json
|-- README.md
|-- src
| `-- index.ts
|-- tests
| `-- index.spec.ts
|-- tsconfig.json
|-- tslint.json
|-- typings
| |-- lme.d.ts
| `-- typings.d.ts
|-- .gitignore
|-- .npmignore
|-- .travis.yml
|-- .vscode
`-- .yo-rc.json
npm run build
, a dist/
folder will also be created with all your compiled code.media/
: All your gallery.src/
: All your source code.typings/
: All your type definitionstests/
: All your tests. Mocha looks at this directory.Special Notes
credentials/
at the root of your package, which will be ignored by both git and npm.npm publish
, mainly the content of dist/
will be published. To know what folders/files will be ignored, take a look at .npmignore
.:warning: Important: Before publishing your package, hand check each and every file and verify everything is perfect.
ts-np
only helps you to get started quickly and step back it self leaving the rest to you.
To know really what happens under the hood, refer scripts
section in package.json
at your package root.
npm run build
: compiles content of src/
into dist/
foldernpm run build-watch
: invokes npm run build
under watch
mode => means, it looks for file changes and if any, re-builds.npm run lint
: lints and styles your code with prettier and tslint and fixes fixable issues.npm run lint-noFix
: invokes npm lint
without fix option => means if any issues found, it just notifies with out fixing it.npm test
or npm run test
: runs your tests in tests/
directory in TypeScript execution environment after temporarily setting env-var NODE_ENV
to test
.npm run test-watch
: invokes npm test
but in watch
mode => means, if any file changes, it automatically re-run tests.npm run lint-noFix
. i.e., while you git commit
your changes, it runs npm run lint-noFix
to confirm that there are no issues with linting. If any issues found, it notifies and abort the commit.--no-verify
.If you found any issues, kindly report at github issues.
MIT © Vajahath Ahmed
FAQs
Yeoman Generator For Building Node Packages With Typescript
The npm package generator-ts-np receives a total of 3 weekly downloads. As such, generator-ts-np popularity was classified as not popular.
We found that generator-ts-np demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.