From d02fe2624cf824314e2b11c3952e9aa57d3ad5f8 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Thu, 12 Apr 2018 00:06:12 +0300 Subject: [PATCH] refactor: rename package to ngx-moment --- .github/ISSUE_TEMPLATE.md | 2 +- CONTRIBUTING.md | 12 ++++++------ README.md | 14 +++++++------- package.json | 15 ++++++++------- src/add.pipe.ts | 2 +- src/calendar.pipe.ts | 2 +- src/date-format.pipe.ts | 2 +- src/difference.pipe.ts | 2 +- src/from-unix.pipe.ts | 2 +- src/from-utc.pipe.ts | 2 +- src/subtract.pipe.ts | 2 +- src/time-ago.pipe.ts | 2 +- 12 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index a2b08db..6bc3bf0 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -9,7 +9,7 @@ Please describe the issue and steps to reproduce, preferably with a code sample -*Ensure your issue is isolated to angular2-moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.* +*Ensure your issue is isolated to ngx-moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.* **Environment:** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 76876da..ab4c4bf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,9 @@ # Contributing Guide -Contributing to `angular2-moment` is fairly easy. This document shows you how to +Contributing to `ngx-moment` is fairly easy. This document shows you how to get the project, run all provided tests and generate a production ready build. -It also covers provided npm scripts, that help you developing on `angular2-moment`. +It also covers provided npm scripts, that help you developing on `ngx-moment`. ## Dependencies @@ -16,20 +16,20 @@ on you machine: ## Installation -To get the source of `angular2-moment` clone the git repository via: +To get the source of `ngx-moment` clone the git repository via: -`git clone https://github.com/urish/angular2-moment` +`git clone https://github.com/urish/ngx-moment` This will clone the complete source to your local machine. Navigate to the project folder and install all needed dependencies via **npm**: `npm install` -Well done! angular2-moment is now installed and ready to be built. +Well done! ngx-moment is now installed and ready to be built. ## Building -`angular2-moment` comes with a few **npm scripts** which help you to automate +`ngx-moment` comes with a few **npm scripts** which help you to automate the development process. The following npm scripts are provided: #### npm test diff --git a/README.md b/README.md index 095d4d7..a1a1c2a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# angular2-moment +# ngx-moment moment.js pipes for Angular -[![Build Status](https://travis-ci.org/urish/angular2-moment.png?branch=master)](https://travis-ci.org/urish/angular2-moment) +[![Build Status](https://travis-ci.org/urish/ngx-moment.png?branch=master)](https://travis-ci.org/urish/ngx-moment) This module works with Angular 2.0 and above. @@ -11,7 +11,7 @@ For the AngularJS version of this module, please see [angular-moment](https://gi Installation ------------ -`npm install --save angular2-moment` +`npm install --save ngx-moment` If you use typescript 1.8, and [typings](https://github.com/typings/typings), you may also need to install typings for moment.js: @@ -35,7 +35,7 @@ packages: { main: './moment.js', defaultExtension: 'js' }, - 'angular2-moment': { + 'ngx-moment': { main: './index.js', defaultExtension: 'js' } @@ -48,7 +48,7 @@ Usage Import `MomentModule` into your app's modules: ``` typescript -import { MomentModule } from 'angular2-moment'; +import { MomentModule } from 'ngx-moment'; @NgModule({ imports: [ @@ -57,7 +57,7 @@ import { MomentModule } from 'angular2-moment'; }) ``` -This makes all the `angular2-moment` pipes available for use in your app components. +This makes all the `ngx-moment` pipes available for use in your app components. Available pipes --------------- @@ -290,7 +290,7 @@ Complete Example import { NgModule, Component } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { MomentModule } from 'angular2-moment'; +import { MomentModule } from 'ngx-moment'; @Component({ selector: 'app', diff --git a/package.json b/package.json index 805baef..b59a1bf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "angular2-moment", - "version": "1.8.0", - "description": "Moment.JS pipes for Angular2 (timeago and more)", + "name": "ngx-moment", + "version": "2.0.0-alpha.0", + "description": "Moment.JS pipes for Angular (timeago and more)", "main": "index.js", "typings": "./index.d.ts", "files": [ @@ -76,18 +76,19 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/urish/angular2-moment.git" + "url": "git+https://github.com/urish/ngx-moment.git" }, "keywords": [ - "angular2", + "angular", + "timeago", "momentjs" ], "author": "Uri Shaked", "license": "MIT", "bugs": { - "url": "https://github.com/urish/angular2-moment/issues" + "url": "https://github.com/urish/ngx-moment/issues" }, - "homepage": "https://github.com/urish/angular2-moment#readme", + "homepage": "https://github.com/urish/ngx-moment#readme", "peerDependencies": { "@angular/core": ">=2.0.0 <6.0.0" }, diff --git a/src/add.pipe.ts b/src/add.pipe.ts index d565dae..ca73567 100644 --- a/src/add.pipe.ts +++ b/src/add.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import {Pipe, ChangeDetectorRef, PipeTransform} from '@angular/core'; import * as moment from 'moment'; diff --git a/src/calendar.pipe.ts b/src/calendar.pipe.ts index cabaaba..ba3b441 100644 --- a/src/calendar.pipe.ts +++ b/src/calendar.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import { Pipe, ChangeDetectorRef, PipeTransform, EventEmitter, OnDestroy, NgZone } from '@angular/core'; import * as moment from 'moment'; diff --git a/src/date-format.pipe.ts b/src/date-format.pipe.ts index 059768d..024e696 100644 --- a/src/date-format.pipe.ts +++ b/src/date-format.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import {Pipe, ChangeDetectorRef, PipeTransform} from '@angular/core'; import * as moment from 'moment'; diff --git a/src/difference.pipe.ts b/src/difference.pipe.ts index 7e9b86d..04ab5a7 100644 --- a/src/difference.pipe.ts +++ b/src/difference.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import {Pipe, ChangeDetectorRef, PipeTransform} from '@angular/core'; import * as moment from 'moment'; diff --git a/src/from-unix.pipe.ts b/src/from-unix.pipe.ts index b5f80e9..82f692d 100644 --- a/src/from-unix.pipe.ts +++ b/src/from-unix.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import {Pipe, ChangeDetectorRef, PipeTransform} from '@angular/core'; import * as moment from 'moment'; diff --git a/src/from-utc.pipe.ts b/src/from-utc.pipe.ts index c1a38fd..5dde5a1 100644 --- a/src/from-utc.pipe.ts +++ b/src/from-utc.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import {Pipe, PipeTransform} from '@angular/core'; import * as moment from 'moment'; diff --git a/src/subtract.pipe.ts b/src/subtract.pipe.ts index 9896334..1d57673 100644 --- a/src/subtract.pipe.ts +++ b/src/subtract.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import {Pipe, ChangeDetectorRef, PipeTransform} from '@angular/core'; import * as moment from 'moment'; diff --git a/src/time-ago.pipe.ts b/src/time-ago.pipe.ts index 6eff024..09f99c5 100644 --- a/src/time-ago.pipe.ts +++ b/src/time-ago.pipe.ts @@ -1,4 +1,4 @@ -/* angular2-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ +/* ngx-moment (c) 2015, 2016 Uri Shaked / MIT Licence */ import {Pipe, ChangeDetectorRef, PipeTransform, OnDestroy, NgZone} from '@angular/core'; import * as moment from 'moment';