npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-ts-lib

v0.5.0

Published

Create your TypeScript module with no build configuration

Downloads

19

Readme

create-ts-lib Backers on Open Collective Sponsors on Open Collective CircleCI Npm Package

Quick Start

You can execute the create-ts-lib CLI using npx or by installing it globally with npm i -g create-ts-lib.

# Use NPX or npm install -g create-ts-lib to install it as a global package
npx create-ts-lib@latest my-typescript-lib
cd my-typescript-lib && npm start

Build and Serve it

  • Browse http://localhost:3000/ to see your bootstrapped module.
  • A bundle is created under /dist folder.
  • Create a minified bundle with npm run build.

Features

You don’t need to install or configure tools like Webpack, Typescript, Karma or Jasmine. They are preconfigured so that you can focus on the code, but as a starter kit you still can modify all the configuration files.

Create a Typescript project

# Use NPX or npm install -g create-ts-lib to install it as a global package
npx create-ts-lib@latest my-typescript-lib
cd my-typescript-lib && npm start

Calling create-ts-lib with my-typescript-lib as an argument creates a directory my-typescript-lib inside the current directory. Inside that directory, the initial file structure of the project is generated with all the devDependencies installed.

my-typescript-lib
├── node_modules
├── src
│   └── index.html
│   └── index.ts
│   └── MyLibrary.ts
│   └── MyLibrary.spec.ts
├── tests
│    └── unit
│        └── spec-bundle.js
├── README.md
├── package.json
├── .gitignore
├── karma.conf.js
├── tsconfig.json
├── tslint.json
└── webpack.config.js

No configuration or complicated folder structures, just the files you need to start your app / package / module.

npm start or npm run server:prod

Runs the app in development / production mode using Webpack dev server. Open http://localhost:3000 🎉 to view it in the browser.

npm test

Runs the unit tests using Karma as test runner and Jasmine as testing framework.

npm run build or npm run build:prod

Creates a bundle into the dist folder:

dist
├── MyLibrary.d.ts # - Example of a 'd.ts' declaration file
├── app.bundle.js # - Main bundle of the application. name from webpack.config
├── app.bundle.js.map # - Sourcemap
├── index.d.ts
└── index.html # - html page referencing app.bundle.js

Development

We'd love to have your helping hand on create-ts-lib! See CONTRIBUTING.md for more information on what we're looking for and how to get started.

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]