Personal Income Tax (PIT) calculator utility for Nepal
Download the zip file and you simply use the script tag to load bundled file.
<script src="./danfebooks.pit.js"></script>This script tag will expose a variable called "danfebooks" to your global space.
Install the package
yarn add @danfebooks/nepalpitAnd then, require the package
// app.js
var danfebooks = require('@danfebooks/nepalpit');Please check the example directory for code samples.
The bundled module is an UMD module, and this package can use this in any environments, i.e., browser or nodejs, react
Clone the repo and install npm packages
https://github.com/danfebooks/nepalpit.git
cd nepalpit
yarn
example- Example use cases in browser and nodejslib- Compiled javascript bundlesrc- All source codesrc\test- Test cases
To start the webpack build and a simple HTTP server from the example folder.
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
Run
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.
Make sure you have np package installed globally Then execute, np from the root and follow the np guidelines.