Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Expose moment in Demandware environment #1034
I'm working on a site built using Demandware (hosted ecommerce platform). Demandware is built on Java, and has Rhino included for scripting. ES4th edition proposal is supported with JS 1.7, but there seem to be limitations/bugs in some of the native ES functionality. Scripts are given the extension .ds, variables are not exported (only functions).
To get Moment working within Demandware, I renamed the file to Moment.ds, and added the following to the top of the file:
Then in any script that includes Moment.ds, I have to add
If you could add this information somewhere, or somehow use it to further expose Moment for closed environments such as Demandware, that would be excellent.
I've run into references to this particular platform before, I think. The issue is that, to Demandware,
Though, I'm a little curious why Demandware can't tell that a variable assigned a function (