refactor(package): rename from es7-typescript-starter to typescript-starter
This commit is contained in:
12
README.md
12
README.md
@@ -1,10 +1,10 @@
|
||||
[](https://travis-ci.org/bitjson/es7-typescript-starter)
|
||||
[](https://codecov.io/gh/bitjson/es7-typescript-starter)
|
||||
[](https://www.npmjs.com/package/es7-typescript-starter)
|
||||
[](https://travis-ci.org/bitjson/typescript-starter)
|
||||
[](https://codecov.io/gh/bitjson/typescript-starter)
|
||||
[](https://www.npmjs.com/package/typescript-starter)
|
||||
[](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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "es7-typescript-starter-example-browser",
|
||||
"name": "typescript-starter-example-browser",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "es7-typescript-starter-example-node-typescript",
|
||||
"name": "typescript-starter-example-node-typescript",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
@@ -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
|
||||
|
||||
27
package.json
27
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": [
|
||||
|
||||
@@ -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']
|
||||
* ```
|
||||
|
||||
@@ -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
|
||||
* ```
|
||||
|
||||
Reference in New Issue
Block a user