Comments (5)
I found out, that strict_mode causes this error.
This script seems not to work on NodeJs in strict_mode.
from moment-holiday.
There are several variable declarations missing.
If someone is interested in how to get this library working in strict mode, please check out my fork: https://github.com/MartinLoeper/moment-holiday
from moment-holiday.
@MartinLoeper are you planning to do a pull request to get your changes into this upstream repo (and thus, hopefully, into the NPM module)? I'd love to get these strict/minification issues resolved in the module to get my build working with less fuss.
For me, I had to move that variable declaration out to the top module scope to avoid minification errors. (bjhewitt@388ec0a#diff-5ecd2a99d029816f5c37fce3481f99bd)
from moment-holiday.
I provided the PR =)
However, I did not notice any minification errors. Everything worked well for the following command:
node_modules/.bin/gulp --name=moment-holiday-de.js --locale=Germany --locale=Easter --set=Germany --set=Easter
from moment-holiday.
Thanks. I'm bundling and minifying numerous components together, so although moment-holiday is generating the error, it's possible there's something else at play. In any case, moving the variable declaration worked.
from moment-holiday.
Related Issues (12)
- minification (?) causes error in gulp build process HOT 3
- Lacking Webpack integration HOT 12
- Calculates Day After Thanksgiving incorrectly for 2019 HOT 6
- modifyHolidays.set() only works on server side HOT 2
- broken? HOT 2
- some issue using this in angular HOT 5
- Incorrect Date for Canadian Thanksgiving
- Add support for French public holidays HOT 1
- add International Women's Day
- TypeError: Cannot read property 'fn' of undefined
- isHoliday() doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moment-holiday.