GithubHelp home page GithubHelp logo

js-starter-kit's Introduction

ts-library-starter

NPM version Build Status Coverage Status Standard Version

Example git project that is used for typescript libraries as a starter pack

What does it include:

1. exported class as example for an npm moudle
2. packaging for npm modules (webpack + tslint + awesome-typescript-loader + dts-bundle)
3. testings for npm modules (jest)
4. code coverage (jest) when running tests
5. Typescript => ES5
6. Two versions embed in the package, one for node, one for browser (browserify)

Notes

Please note that you will need to rename the library name in some files:

1. webpack.config.js (bundle_opts)
2. package.json (ofcourse ;))

Also don't forget to reset package version ;)

Useful commands:

npm run prebuild       - install NPM dependancies
npm run build          - build the library files
npm run test           - run the tests
npm run test:watch     - run the tests (watch-mode)
npm run coverage       - run the tests with coverage
npm run coverage:watch - run the tests with coverage (watch-mode)
npm run pack           - build the library, make sure the tests passes, and then pack the library (creates .tgz)
npm run release        - prepare package for next release

Files explained:

1. src - directory is used for typescript code that is part of the project
    1a. src/Example.ts - Just an example exported library, used to should import in tests.
    1b. src/Example.spec.ts - tests for the example class
    1c. src/index.ts        - index, which functionality is exported from the library
3. package.json                 - file is used to describe the library
4. tsconfig.json                - configuration file for the library compilation
6. tslint.json                  - configuration file for the linter (both test and library)
8. webpack.config.js            - configuration file of the compilation automation process for the library

Output files explained:

1. node_modules                       - directory npm creates with all the dependencies of the module (result of npm install)
2. dist                               - directory contains the compiled library (javascript + typings)
3. <module_name>-<module_version>.tgz - final tgz file for publish. (result of npm run pack)
4. coverage                           - code coverage report output made by istanbul

js-starter-kit's People

Contributors

dxcx avatar

Watchers

James Cloos 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.