项目作者: rencire

项目描述 :
Starter project structure for typescript projects
高级语言: JavaScript
项目地址: git://github.com/rencire/ts-lib-starter.git
创建时间: 2018-03-21T02:23:47Z
项目社区:https://github.com/rencire/ts-lib-starter

开源协议:GNU General Public License v3.0

下载


typescript lib starter

An opinionated typescript starter project with focus on packaging modern code for ES modules on Browser and NodeJS runtimes.

  • Transpiles Typescript source to ES2018 files.
  • Specifyes type: "module" in package.json to assume all .js files are using ES modules.
    • Can still write commonjs files via .cjs file extension.
    • See docs for more info.
  • Output a type declaration file to lib/main.d.ts.

Prerequisites

  • Git
  • Nixos/Nix (w/ or w/o direnv) OR nvm OR nodjs installed on system.
  1. git clone https://github.com/rencire/ts-lib-starter <your_project_name>
  2. cd <your_project_name>
  3. rm -rf .git

Choose one of the following:

Nixos/Nix + Direnv (preferred):

If you’re using nix, and have direnv installed (e.g. nix-env -i direnv), simply
cd` into this repo and the correct nodejs version will be installed.

Nixos/Nix

Simply run:

  1. nix-shell

NVM

If you have nvm, a .nvmrc file is provided.

Notes

TODO

Tools