create-ts-lib Build Status Npm Package

A yet another Typescript Webpack Starter

Imgur

Built upon

Quick Overview

npm install -g create-ts-lib

create-ts-lib my-typescript-lib
cd my-typescript-lib/
npm start

Then open http://localhost:3000/ to see your bootstrapped module. When you’re ready to deploy to production, create a minified bundle with npm run build.

Get Started Immediately

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

Just create a project, and you’re good to go.

Getting started

Installation

Install it once globally:

npm install -g create-ts-lib

Creating a TypeScript module

To create a new module, run:

create-ts-lib my-ts-module
cd my-ts-module

It will create a directory called my-ts-module inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:

my-ts-module
β”œβ”€β”€ node_modules
β”œβ”€β”€ src
β”‚   └── index.html
β”‚   └── index.spec.ts
β”‚   └── index.ts
β”‚   └── vendor.js
β”œβ”€β”€ tests
β”‚    └── unit
β”‚        └── spec-bundle.js
β”œβ”€β”€ README.md
β”œβ”€β”€ package.json
β”œβ”€β”€ .gitignore
β”œβ”€β”€ karma.conf.js
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ tslint.json
β”œβ”€β”€ typings.json
└── webpack.config.js

No configuration or complicated folder structures, just the files you need to build your app.
Once the installation is done, you can run some commands inside the project folder:

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

Build a development release

After build phase, 3 files are generated into the dist folder: