india-pincode-regex/HACKING.md
Nemo e8403d43e3 Adds support for browser-usage using browserify
- Browserify with the brfs plugin generates the stub JS file
  that can be included directly in the browser
- Jasmine is supported for an integration test-suite in the browser
2020-04-21 21:09:50 +05:30

19 lines
591 B
Markdown

# Generating the regex
1. Download the latest CSV file from <https://data.gov.in/node/85839/download> or <https://data.gov.in/resources/all-india-pincode-directory>.
2. Copy all the pincodes to a pincodes.txt file
3. Generate all unique pincodes by running `sort -u pincodes.txt > /tmp/pin.txt`
4. `npm install`
5. `node src/generate.js /tmp/pin.txt > regex.txt`
# Generating the browser-version
1. Make sure development dependencies are installed.
2. `npm run browserify`.
3. Test it by opening `tests/index.html` in your browser.
# PHP Release
1. `git tag 1.2.3`
2. `git push --tags`