opensource-nepal / node-nepali-datetime

A Node project designed to support native JavaScript-like features for Nepali date and times. It includes features such as 'NepaliDate' for Nepali date support and 'dateConverter' for date conversions.
GNU General Public License v3.0
63 stars 18 forks source link

fix: remove dist and update gitignore #54

Closed rubiin closed 1 year ago

rubiin commented 1 year ago

Description

Updates the gitgnore file to add dist and other generated files. Also removes the dist file

Type of Change

Please mark the appropriate option below to describe the type of change your pull request introduces:

Checklist

Additional Notes

By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.

sugat009 commented 1 year ago

@rubiin Thank you for your contribution. It appears that you've tried to delete the dist directory. We included the dist directory with the purpose of enabling installation of this package from GitHub, in addition to npm. We are open to better alternatives if it enables installation from GitHub though. Ref: https://github.com/axios/axios CC: @aj3sh

rubiin commented 1 year ago

If serving the package from github is an issue, this has been addressed by adding npm rub build on prepare. With this npm automatically builds the package upon installation. You can try to run the library by creating a sample nodejs project and do npm install https://github.com/rubiin/node-nepali-datetime and try out @sugat009

const NepaliDate = require('nepali-datetime')
// Create a NepaliDate object for the current date and time
const now = new NepaliDate()
console.log(now.toString()) // Outputs: "2080-03-23 15:32:03.643"

By this approach we get best of both worlds as generated folders on github are prone to merge conflicts and thus technical debt in a sense