From 3c6f7b7419fff06d40c8531805dc80d61a4ea789 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Mon, 13 Feb 2017 17:59:41 -0500 Subject: [PATCH] refactor(package): rename from es7-typescript-starter to typescript-starter --- README.md | 12 ++++++------ examples/browser/package.json | 2 +- examples/node-typescript/package.json | 2 +- examples/readme.md | 12 ++++++------ package.json | 27 +++++++++++++++++++-------- src/lib/asyncOps.ts | 4 ++-- src/lib/numberOps.ts | 8 ++++---- 7 files changed, 39 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index cfcfee0..8ace9bd 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -[![Build Status](https://travis-ci.org/bitjson/es7-typescript-starter.svg?branch=master)](https://travis-ci.org/bitjson/es7-typescript-starter) -[![Codecov](https://img.shields.io/codecov/c/github/bitjson/es7-typescript-starter.svg)](https://codecov.io/gh/bitjson/es7-typescript-starter) -[![NPM version](https://img.shields.io/npm/v/es7-typescript-starter.svg)](https://www.npmjs.com/package/es7-typescript-starter) +[![Build Status](https://travis-ci.org/bitjson/typescript-starter.svg?branch=master)](https://travis-ci.org/bitjson/typescript-starter) +[![Codecov](https://img.shields.io/codecov/c/github/bitjson/typescript-starter.svg)](https://codecov.io/gh/bitjson/typescript-starter) +[![NPM version](https://img.shields.io/npm/v/typescript-starter.svg)](https://www.npmjs.com/package/typescript-starter) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) -# es7-typescript-starter -An es7/typescript starter for building javascript libraries: +# typescript-starter +A typescript starter for building javascript libraries and projects: * Write **standard, future javascript** – with stable es7 features – today ([stage 3](https://github.com/tc39/proposals) or [finished](https://github.com/tc39/proposals/blob/master/finished-proposals.md) features) * [Optionally use typescript](https://basarat.gitbooks.io/typescript/content/docs/why-typescript.html) to improve tooling, linting, and documentation generation @@ -139,4 +139,4 @@ By default, this project requires [tslib](https://github.com/Microsoft/tslib) as By default, this library targets environments with native (or already-polyfilled) support for es6 features. If your library needs to target Internet Explorer, outdated Android browsers, or versions of Node older than v4, you may need to change the `target` in `tsconfig.json` to `es5` (rather than `es6`) and bring in a Promise polyfill (such as [es6-promise](https://github.com/stefanpenner/es6-promise)). -It's a good idea to maintain 100% unit test coverage, and always test in the environments you target. +It's a good idea to maintain 100% unit test coverage, and always test in the environments you target. diff --git a/examples/browser/package.json b/examples/browser/package.json index 3389f72..8dd3b83 100644 --- a/examples/browser/package.json +++ b/examples/browser/package.json @@ -1,5 +1,5 @@ { - "name": "es7-typescript-starter-example-browser", + "name": "typescript-starter-example-browser", "version": "1.0.0", "license": "MIT", "scripts": { diff --git a/examples/node-typescript/package.json b/examples/node-typescript/package.json index 33d58c5..d979b65 100644 --- a/examples/node-typescript/package.json +++ b/examples/node-typescript/package.json @@ -1,5 +1,5 @@ { - "name": "es7-typescript-starter-example-node-typescript", + "name": "typescript-starter-example-node-typescript", "version": "1.0.0", "license": "MIT", "scripts": { diff --git a/examples/readme.md b/examples/readme.md index 6021162..2e7f53c 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -1,13 +1,13 @@ # Usage Examples -This directory (`/examples`) can be deleted when forking this project. It contains some simple examples of how forks of `es7-typescript-starter` can be used by other projects. (Usually you'll want to provide these instructions in your root `readme.md`.) +This directory (`/examples`) can be deleted when forking this project. It contains some simple examples of how forks of `typescript-starter` can be used by other projects. (Usually you'll want to provide these instructions in your root `readme.md`.) ## Node (Vanilla) This shows the simplest use case – a quick, hacked-together Node.js project with no type safety, and no pre-processing. This is the way most of the Node.js ecosystem currently expects to import a node modules. ```bash -# build es7-typescript-starter first +# build typescript-starter first yarn build cd examples/node-vanilla @@ -18,10 +18,10 @@ node test.js ## Node (Typescript) -This is for larger and more established Node.js projects which use Typescript for type safety. You'll notice that the type declarations and inline documentation from `es7-typescript-starter` are accessible to [Typescript-compatible editors](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support) like [vscode](https://code.visualstudio.com/). +This is for larger and more established Node.js projects which use Typescript for type safety. You'll notice that the type declarations and inline documentation from `typescript-starter` are accessible to [Typescript-compatible editors](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support) like [vscode](https://code.visualstudio.com/). ```bash -# build es7-typescript-starter first +# build typescript-starter first yarn build cd examples/node-typescript @@ -36,12 +36,12 @@ yarn start ## Browser (tree-shaking with Rollup) -This project imports the `power` and `asyncABC` functions from the ES6 output of `es7-typescript-starter`, without importing the `double` function. This allows for the `double` method to be completely excluded from output via [Rollup's tree-shaking](http://rollupjs.org/), making the final javascript bundle potentially much smaller, even before using a minifier like [Uglify](https://github.com/mishoo/UglifyJS2). +This project imports the `power` and `asyncABC` functions from the ES6 output of `typescript-starter`, without importing the `double` function. This allows for the `double` method to be completely excluded from output via [Rollup's tree-shaking](http://rollupjs.org/), making the final javascript bundle potentially much smaller, even before using a minifier like [Uglify](https://github.com/mishoo/UglifyJS2). To demonstrate, this example doesn't minify or remove comments. You can see where some javascript has been excluded from the bundle. ```bash -# build es7-typescript-starter first +# build typescript-starter first yarn build cd examples/browser diff --git a/package.json b/package.json index a07983b..ba3fc6d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "es7-typescript-starter", + "name": "typescript-starter", "version": "1.1.1", - "description": "An es7/typescript starter for building javascript libraries", + "description": "A typescript starter for building javascript libraries and projects", "main": "build/main/index.js", "typings": "build/main/index.d.ts", "module": "build/module/index.js", @@ -57,14 +57,25 @@ "typescript": "^2.2.0" }, "keywords": [ - "node", - "typescript", - "typings", + "async", + "ava", + "await", "boilerplate", + "conventional-changelog", + "ES6", + "ES7", + "library", + "javascript-modules", + "node", + "nyc", + "rollup", "starter", - "es6", - "es7", - "library" + "template", + "tree-shaking", + "tslint", + "typedoc", + "typescript", + "typings" ], "nyc": { "exclude": [ diff --git a/src/lib/asyncOps.ts b/src/lib/asyncOps.ts index bc16669..c2c00f7 100644 --- a/src/lib/asyncOps.ts +++ b/src/lib/asyncOps.ts @@ -3,14 +3,14 @@ * * ### Example (es imports) * ```js - * import { asyncABC } from 'es7-typescript-starter' + * import { asyncABC } from 'typescript-starter' * console.log(await asyncABC()) * // => ['a','b','c'] * ``` * * ### Example (commonjs) * ```js - * var double = require('es7-typescript-starter').asyncABC; + * var double = require('typescript-starter').asyncABC; * asyncABC().then(console.log); * // => ['a','b','c'] * ``` diff --git a/src/lib/numberOps.ts b/src/lib/numberOps.ts index 0a70d4e..18dfe74 100644 --- a/src/lib/numberOps.ts +++ b/src/lib/numberOps.ts @@ -3,14 +3,14 @@ * * ### Example (es module) * ```js - * import { double } from 'es7-typescript-starter' + * import { double } from 'typescript-starter' * console.log(double(4)) * // => 8 * ``` * * ### Example (commonjs) * ```js - * var double = require('es7-typescript-starter').double; + * var double = require('typescript-starter').double; * console.log(double(4)) * // => 8 * ``` @@ -28,14 +28,14 @@ export function double (value: number) { * * ### Example (es module) * ```js - * import { power } from 'es7-typescript-starter' + * import { power } from 'typescript-starter' * console.log(power(2,3)) * // => 8 * ``` * * ### Example (commonjs) * ```js - * var power = require('es7-typescript-starter').power; + * var power = require('typescript-starter').power; * console.log(power(2,3)) * // => 8 * ```