Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
benwilkins committed Jul 17, 2017
2 parents fa5b9eb + 54fa255 commit 05e5e82
Show file tree
Hide file tree
Showing 21 changed files with 3,566 additions and 105 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ parse.pipe.d.ts
local.pipe.js
local.pipe.js.map
local.pipe.d.ts
locale.pipe.js
locale.pipe.js.map
locale.pipe.d.ts
*.spec.js
*.spec.js.map
*.spec.d.ts
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_js:
- "4"
- "5"
- "6"
- "7"
- "8"
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Changelog

## 1.5.0 - 2017-07-14
- Add `amLocale` pipe ([#155](https://github.com/urish/angular2-moment/pull/155), contributed by [FallenRiteMonk](https://github.com/FallenRiteMonk))
- Migrate testing framework to jest

## 1.4.0 - 2017-06-18
- Add `ParsePipe` to enable parsing of custom-formatted date string ([#148](https://github.com/urish/angular2-moment/pull/148), contributed by [vin-car](https://github.com/vin-car))
- Add `amParse` pipe to enable parsing of custom-formatted date string ([#148](https://github.com/urish/angular2-moment/pull/148), contributed by [vin-car](https://github.com/vin-car))

## 1.3.3 - 2017-03-18
- Fix: amCalendar causes protractor to timeout on waiting async Angular ([#135](https://github.com/urish/angular2-moment/pull/135), contributed by [romanovma](https://github.com/romanovma))
- Fix: `amCalendar` causes protractor to timeout on waiting async Angular ([#135](https://github.com/urish/angular2-moment/pull/135), contributed by [romanovma](https://github.com/romanovma))

## 1.3.2 - 2017-03-17
- Fix: Add missing `add` and `subtract` pipes to the NgModule ([#134](https://github.com/urish/angular2-moment/pull/134), contributed by [datencia](https://github.com/datencia))
- Fix: Add missing `amAdd` and `amSubtract` pipes to the NgModule ([#134](https://github.com/urish/angular2-moment/pull/134), contributed by [datencia](https://github.com/datencia))

## 1.3.1 - 2017-03-16
- Add missing `amAdd` and `amSubtract` pipes (fixes [#130](https://github.com/urish/angular2-moment/issues/130))
Expand Down Expand Up @@ -76,7 +80,7 @@ All changes:
- Add `amDifference` pipe ([#54](https://github.com/urish/angular2-moment/pull/54), contributed by [josx](https://github.com/josx))

## 0.8.1 - 2016-07-03
- Add `omitSuffix` parameter to `TimeAgoPipe` ([#47](https://github.com/urish/angular2-moment/pull/47), contributed by [bzums](https://github.com/bzums))
- Add `omitSuffix` parameter to `amTimeAgo` pipe ([#47](https://github.com/urish/angular2-moment/pull/47), contributed by [bzums](https://github.com/bzums))

## 0.8.0 - 2016-05-22
- Publish typescript sources under `src` folder, should fix Ionic 2 issues such as [#28](https://github.com/urish/angular2-moment/issues/28) and [#33](https://github.com/urish/angular2-moment/issues/33).
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ the development process. The following npm scripts are provided:
#### npm test

`npm test` compiles the typescript code into javascript, and then runs the unit
tests, which are located in `src/*.spec.ts`. The task uses the **karma** test
runner to executes the tests with the **jasmine testing framework**.
tests, which are located in `src/*.spec.ts`. The task uses the [jest test runner](https://facebook.github.io/jest/).

#### npm run prepublish

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,22 @@ Converts UTC time to local time.

Prints `Last updated 2016-01-24 12:34`


## amLocale pipe

To be used with amDateFormat pipe in order to change locale.

``` typescript
@Component({
selector: 'app',
template: `
Last updated: {{'2016-01-24 14:23:45' | amLocale:'en' | amDateFormat:'MMMM Do YYYY, h:mm:ss a'}}
`
})
```

Prints `Last updated: January 24th 2016, 2:23:45 pm`

## amFromUnix pipe

``` typescript
Expand Down
1 change: 1 addition & 0 deletions jest-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('reflect-metadata');
11 changes: 11 additions & 0 deletions jest-typescript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const tsc = require('typescript');
const tsConfig = require('./tsconfig.json');

module.exports = {
process(src, path) {
if (path.endsWith('.ts')) {
return tsc.transpile(src, tsConfig.compilerOptions, path, []);
}
return src;
},
};
49 changes: 0 additions & 49 deletions karma.conf.js

This file was deleted.

0 comments on commit 05e5e82

Please sign in to comment.