Code Monkey home page Code Monkey logo

typescript-starter's Introduction

TypeScript-Starter - TypeScript 库开发框架

特性

开发说明

强制遵循

  • 使用 TypeScript 进行开发

  • 需要为每一个类或方法进行注释,最小化注释为:方法说明、参数、返回值

  • 需要为每一个导出的类或方法编写测试

  • 使用 git addnpm run commit 来提交代码

约定

  • src/index.ts 作为入口文件,应该在这里导出所有方法

开始

  • Fork 该仓库后 Clone 到本地

  • 更改项目信息:仓库地址、名称、作者等

  • 安装依赖

  • 开始开发

NPM 脚本说明

  • npm run lint: 使用 tslint 规范代码

  • npm run rm: 移除 dist / docs 目录

  • npm run build: 生成 bundles、.d.ts文件、以及文档

  • npm start: 以 live-reload 模式运行 npm run build

  • npm run test: 运行测试

  • npm run test:watch: 以 观察模式 运行测试

  • npm run test:prod: lint 代码、运行测试并生成测试文档(包含测试覆盖率)

  • npm run commit: 规范化、可交互的代码提交流程,基于 conventional 规范

库的使用

全量引入:

import awesomeLib from 'awesomeLib'

dist/lib 按需引入:

import coolFn from 'mylib/dist/lib/coolFn'

typescript-starter's People

Contributors

jarrychung avatar

Stargazers

 avatar Steven avatar

Watchers

James Cloos avatar Steven avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.