Skip to content

Commit

Permalink
3.0.0
Browse files Browse the repository at this point in the history
* Go full-blown ES6 via webpack/babel
* Flow typing
* Better documentation
* Remove bower
* Remove grunt in favour of webpack
* Remove jshint in favour of eslint
* Remove mocha/should in favour of karma/mocha/expect.js
* New usage:
    import Moment from 'moment';
    import { DateRange, extendMoment } from 'moment-js';
    const moment = extendMoment(Moment);
* Add `by`, `reverseBy`, `byRange`, `reverseByRange` (#68)
    - Pass options as object
    - New methods use iterators
    - Added reversal methods
    - Discrete methods for different iterator types
* Fix issue with `moment#within` and moment-timezone (#127)
* Pass optional rounded argument in `diff` (#104)
* Add ability to iterate over a range by a step (#93)
* Add `adjacent` method and option to `overlaps` (#92 #112)
* Update short-hand units (#134)
* Add `duration` as an alias of `diff` (#64)
* Update packaging rules and scripts
* Fix typo in comment (#133)
* Update documentation
* Add documentation about range creation (thanks @seanwendt)
  • Loading branch information
gf3 committed Jan 10, 2017
1 parent e85e7bc commit b78b91b
Show file tree
Hide file tree
Showing 41 changed files with 7,311 additions and 1,828 deletions.
69 changes: 69 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"parser": "babel-eslint",
"env": {
"node": true,
"browser": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
"rules": {
"array-bracket-spacing": [2, "never"],
"brace-style": [2, "stroustrup", {"allowSingleLine": true}],
"camelcase": [2, {"properties": "never"}],
"comma-dangle": [2, "never"],
"comma-spacing": [2, {"before": false, "after": true}],
"constructor-super": 2,
"eol-last": 2,
"indent": [2, 2, {"SwitchCase": 1}],
"jsx-quotes": 2,
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"keyword-spacing": 2,
"no-alert": 2,
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-else-return": 1,
"no-empty": 2,
"no-extra-semi": 2,
"no-func-assign": 1,
"no-inner-declarations": [2, "both"],
"no-irregular-whitespace": 2,
"no-multiple-empty-lines": [1, {"max": 2}],
"no-redeclare": 2,
"no-sequences": 2,
"no-spaced-func": 2,
"no-shadow": 0,
"no-trailing-spaces": 2,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 2,
"no-unused-expressions": 2,
"no-unused-vars": 0,
"no-use-before-define": [2, "nofunc"],
"no-var": 2,
"object-curly-spacing": [2, "always", { "objectsInObjects": false, "arraysInObjects": true }],
"object-shorthand": [1, "always"],
"one-var": [2, "never"],
"padded-blocks": [2, "never"],
"prefer-const": [1, {
"destructuring": "all"
}],
"quotes": [2, "single", "avoid-escape"],
"radix": 2,
"semi": [2, "always"],
"semi-spacing": [2, {"before": false, "after": true}],
"sort-vars": 1,
"space-before-function-paren": [2, "never"],
"space-in-parens": [2, "never"],
"spaced-comment": [2, "always", { "exceptions": ["-"] }],
"strict": 0,
"yoda": [2, "never"]
}
}
12 changes: 12 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[ignore]

[include]
declarations/

[libs]

[options]
esproposal.class_instance_fields=enable
esproposal.class_static_fields=enable
suppress_comment=.*\\$FlowFixMe
suppress_comment=.*\\$FlowIssue
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules/
dist/
docs/
node_modules/
tags
/.idea
18 changes: 0 additions & 18 deletions .jsdoc

This file was deleted.

34 changes: 0 additions & 34 deletions .jshintrc

This file was deleted.

3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declarations/
flow-typed/
lib/
9 changes: 9 additions & 0 deletions .tern-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"libs": [
"browser"
],
"plugins": {
"webpack": {},
"complete_strings": {}
}
}
69 changes: 0 additions & 69 deletions Gruntfile.js

This file was deleted.

Loading

0 comments on commit b78b91b

Please sign in to comment.