
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
generator-tslib-webpack
Advanced tools
A Yeoman generator for scaffolding a reusable library written in Typescript.
A Yeoman generator for generating a UMD JavaScript library using TypeScript and Webpack
brew install node
choco install nodejs
Install Yeoman npm install -g yo
Install these NPM packages globally
npm install -g webpack karma-cli
npm install -g generator-tslib-webpack
Start the TypeScript Library Webpack Generator
yo tslib-webpack
You will be prompted for the following information
.
|-- .editorconfig
|-- .gitignore
|-- karma.conf.js
|-- node_modules
|-- package.json
|-- <source directory>
|-- greeter.ts
|-- greeter.spec.ts
|-- index.ts
|-- tsconfig.json
|-- tslint.json
|-- webpack.config.js
.editorconfig
The configuration for text editors. The default indentation is 2 spaces. Edit this file if you want to use tabs or a different number of spaces.
.gitignore
The default list of project files that Git should not attempt to commit to the repository. Edit this if there are different files you add that you do not want to commit (build directories, temp files, etc).
karma.conf.js
The configuration file for the Karma test runned used to execute the unit tests. This file should be altered for changes to the overall testing process.
node_modules
The folder contains all of the required dependencies for the project. You should not edit this file directly.
package.json
The NPM package file for the project containing the project's name, version, and dependencies. Update this file to add or change dependencies.
<source directory>
The directory that will contain all of the TypeScript source files for your library. Any new code meant to be distributed with the library should be placed in here.
<source directory>/greeter.ts
An example TypeScript class that writes a simple message to the console. This file should be replaced with the actual functionality of your library.
<source directory>/greeter.spec.ts
An example set of test cases for the Greeter class. This should be replaced with test cases specific to your library.
<source directory>/index.ts
The main TypeScript file pulling together all of the parts of the library. References to new TypeScript files should be placed in here.
tsconfig.json
The configuration for the TypeScript compiler. Any changes to how the TypeScript should be compiled should be made here.
tslint.json
The configuration for linting TypeScript code. Any changes to style rules or coding conventions should be made in this file.
webpack.config.js
The configuration for the webpack build. Any changes to the build process should be made in this file.
npm run clean
Removes the build artifacts and distributables.
npm run build
Builds both the uncompressed and minified versions of the library, as well as type defintiions and source maps.
npm run build:dev
Builds the uncompressed development version of the library, type definitions, and TypeScript to JavaScript sourcemap.
npm run build:prod
Builds the minified production version of the library, type definiitions, and a TypeScript to minified JavaScript source map.
npm run lint
Run the tslint utility on the TypeScript source and reports any errors or warnings.
npm test
Runs the unit tests and reports test status and code coverage. By default, this will automatically watch for changes and re-execute the tests when a change is detected.
npm run release:patch
Cleans, tests, and rebuilds the project, bumps the version by one patch version (0.0.1 -> 0.0.2) and tags it. Pushes the tag back to the Git repository.
npm run release:minor
Cleans, tests, and rebuilds the project, bumps the version by one minor version (0.0.1 -> 0.1.0) and tags it. Pushes the tag back to the Git repository.
npm run release:major
Cleans, tests, and rebuilds the project, bumps the version by one major version (0.0.1 -> 1.0.0) and tags it. Pushes the tag back to the Git repository.
Microsoft's Visual Studio Code editor provides great support out of the box for TypeScript projects. The library project that is generated will have a default .vscode folder with several settings pre-configured. The default project also includes several tasks so that the commands "Tasks: Run Test Task" and "Tasks: Run Build Task" will run the unit tests and build from within Visual Studio Code.
Github's Atom is another free text editor with good support for TypeScript via the Atom TypeScript plugin.
yo tslib-webpack
" to generate the project.I would recommend having a terminal open running "npm test
" or using the "Tasks: Run Test Task" in Visual Studio Code to output the linter warnings, test results, and code coverage.
You are now free to do whatever you want with the code base. Install some additional NPM libraries or types. Replace the greeter.ts file with something meaningful. Add additional Webpack plugins.
The generated project contains several NPM scripts for preparing a release. The "release:patch", "release:minor", and "release:major" scripts all clean and rebuild the project and run the unit tests prior to updating the version and tagging it.
After a version is tagged in your repository, you may use the "npm publish
" command to publicly expose
your library to NPM.
FAQs
A Yeoman generator for scaffolding a reusable library written in Typescript.
The npm package generator-tslib-webpack receives a total of 0 weekly downloads. As such, generator-tslib-webpack popularity was classified as not popular.
We found that generator-tslib-webpack 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.