Skip to content

Commit

Permalink
Update 07-browserify.md (moment#413)
Browse files Browse the repository at this point in the history
* Update 07-browserify.md

If one needs to include all the locales then one can require locales.min and set the locale with moment.locale().

* Update .markdown-doctest-setup.js

Including  "moment/min/locales.min" it in the require section
  • Loading branch information
sameercaresu authored and maggiepint committed Mar 28, 2017
1 parent ab81b86 commit 5614c04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .markdown-doctest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = {
require: {
moment: moment,
'moment-timezone': momentTimezone,
'moment/locale/cs': require('moment/locale/cs')
'moment/locale/cs': require('moment/locale/cs'),
'moment/min/locales.min': require('moment/min/locales.min')
},

beforeEach: function () {
Expand Down
7 changes: 7 additions & 0 deletions docs/moment/00-use-it/07-browserify.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ var moment = require('moment');
require('moment/locale/cs');
console.log(moment.locale()); // cs
```
In order to include all the locales
```javascript
var moment = require('moment');
require("moment/min/locales.min");
moment.locale('cs');
console.log(moment.locale()); // cs
```

0 comments on commit 5614c04

Please sign in to comment.