项目作者: danfebooks

项目描述 :
Personal Income Tax (PIT) calculator utility for Nepal
高级语言: JavaScript
项目地址: git://github.com/danfebooks/nepalpit.git
创建时间: 2020-05-31T06:52:30Z
项目社区:https://github.com/danfebooks/nepalpit

开源协议:MIT License

下载


PIT Calculator for Nepal" class="reference-link">PIT Calculator for Nepal

Personal Income Tax (PIT) calculator utility for Nepal

npm version

🛠 How to use

For Browsers

Download the zip file and you simply use the script tag to load bundled file.

  1. <script src="./danfebooks.pit.js"></script>

This script tag will expose a variable called “danfebooks“ to your global space.

For nodejs

Install the package

  1. yarn add @danfebooks/nepalpit

And then, require the package

  1. // app.js
  2. var danfebooks = require('@danfebooks/nepalpit');

Please check the example directory for code samples.

📦 Packaged modules

The bundled module is an UMD module, and this package can use this in any environments, i.e., browser or nodejs, react


Development

Clone the repo and install npm packages

  1. https://github.com/danfebooks/nepalpit.git
  2. cd nepalpit
  3. yarn

Project structure

  • example - Example use cases in browser and nodejs
  • lib - Compiled javascript bundle
  • src - All source code
  • src\test - Test cases

Start dev server

To start the webpack build and a simple HTTP server from the example folder.

  1. yarn start

The example directory is used for the development build for seamless browser testing.

If you want to test nodejs, run yarn example:node, or a simple html usage: yarn example:browser

Navigate to http://localhost:3000


Build

Run

  1. yarn build

The above command will produce a production build inside the lib directory to publish on npm. The lib directory is also the package’s main field.

Publish to npm

Make sure you have np package installed globally Then execute, np from the root and follow the np guidelines.