GithubHelp home page GithubHelp logo

xkelvinx666 / typescript-libs-builder Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 9 KB

a builder for typescript libs,including eslint babel jest

License: MIT License

JavaScript 94.00% TypeScript 6.00%

typescript-libs-builder's Introduction

typescript-libs-builder

a builder for typescript libs,including eslint jest

'xxx' below is your project package.json name

how to use

# install
npm install typescript-libs-builder --save-dev
# add build script in your project package.json
"scripts": {
  "init": "node ./node_modules/typescript-libs-builder/lib/init.js",
  "dev": "node ./node_modules/typescript-libs-builder/lib/dev.js",
  "build": "node ./node_modules/typescript-libs-builder/lib/build.js",
  "format": "node ./node_modules/typescript-libs-builder/lib/format.js",
  "test": "node ./node_modules/typescript-libs-builder/lib/test.js"
}
# add export declartion
"module": "./dist/xxx.es.min.js",
"main": "./dist/xxx.cjs.min.js",
"typings": "./dist/index.d.ts",
# init your project dir, copy boilerplate
npm run init
# debug your code, and output 'xxx.es.js'
npm run dev
# build your code, and outout 'xxx.es.min.js', 'xxx.cjs.min.js', 'xxx.umd.min.js'
npm run build
# format and fix your code in 'src' dir
npm run format
# run jest test in '__test__' dir
npm run test

output file description

output file name description
xxx.es.js build src/index.ts and node_modules by es
xxx.es.min.js minify build src/index.ts without node_modules by es
xxx.cjs.min.js minify build src/index.ts without node_modules by cjs
xxx.umd.min.js minify build src/index.ts and node_modules by umd

redefine build plugin config

"eslint" config can redefine, just declare ".eslintrc.js" in your project dir

typescript-libs-builder's People

Watchers

 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.