boo1ean / casual

Fake data generator for javascript
3.03k stars 154 forks source link

Create a standalone, static build? #59

Open haferje opened 7 years ago

haferje commented 7 years ago

Is it possible to create a standalone build for use as a vanilla .js script include in the browser? I want to create a mockup for my current project, but don't want to fuss with Node - I just want to be able to include it in a .html page and go...

Klowner commented 7 years ago

You can use https://github.com/Klowner/casual-browserify It's just casual with no runtime require()s

haferje commented 7 years ago

Still not what I meant. I don't want to deal with Node or other third-party build tool. I'm looking for a client-side include for a straight HTML page (remember those? :smiley:). Something like what you would see in a project's build or dist directory. It should be something I can use when all I have is a basic text editor and browser.

For example: <script src="scripts/casual.min.js">

Klowner commented 7 years ago

https://github.com/Klowner/casual-vanilla/tree/master/lib like this?

haferje commented 7 years ago

yes, exactly! thank you.

however, i can't seem to get any data from en_US locale (ie. casual.en_US.month_name gives me "settembre")

Klowner commented 7 years ago

weeeell, that means I've got a problem.

Klowner commented 7 years ago

hrm, looks like an issue related to moment's locale settings. Are you only seeing locale problems with date related properties?

haferje commented 7 years ago

I'll try to be a little more appropriate and continue our conversation in your repository... https://github.com/Klowner/casual-vanilla/issues/1