From 82dfb5ce9ad12b1abef8afa96b5d99a3072f7529 Mon Sep 17 00:00:00 2001 From: Pierre Clavequin Date: Fri, 24 May 2024 14:35:15 +0800 Subject: [PATCH] chore: change package name + version Version number match with Angular, that is easier to follow-up --- README.md | 27 +++++++-------------------- package-lock.json | 8 ++++---- package.json | 8 ++++---- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index c13c1c8..f2111ce 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,12 @@ A [lightbox2](https://github.com/lokesh/lightbox2) implementation port to use with new Angular without the need for jQuery -## Version - -- For Angular 5, 6, 7, please use ngx-lightbox 1.x.x. `npm install ngx-lightbox@1.2.0` -- For Angular >= 8, please use ngx-lightbox 2.x.x. `npm install ngx-lightbox@2.0.0` -- For Angular 2, 4, please use [angular2-lightbox](https://github.com/themyth92/angular2-lightbox) ## [Demo](https://themyth92.com/project/ngx-lightbox) ## Installation -`npm install --save ngx-lightbox` +`npm install --save @pierresh/ngx-lightbox` Update your `angular.json` @@ -31,10 +26,10 @@ Update your `angular.json` ### Module: -Import `LightboxModule` from `ngx-lightbox` +Import `LightboxModule` from `@pierresh/ngx-lightbox` ```javascript -import { LightboxModule } from 'ngx-lightbox'; +import { LightboxModule } from '@pierresh/ngx-lightbox'; @NgModule({ imports: [ LightboxModule ] @@ -54,7 +49,7 @@ import { LightboxModule } from 'ngx-lightbox'; 2. Component method ```javascript -import { Lightbox } from 'ngx-lightbox'; +import { Lightbox } from '@pierresh/ngx-lightbox'; export class AppComponent { private _album: Array = []; @@ -99,7 +94,7 @@ Each `object` of `album` array inside your component may contains 3 properties : You can listen to 3 events, which are either **CHANGE_PAGE**, **CLOSE** or **OPEN**. ```javascript -import { LightboxEvent, LIGHTBOX_EVENT } from 'ngx-lightbox'; +import { LightboxEvent, LIGHTBOX_EVENT } from '@pierresh/ngx-lightbox'; import { Subscription } from 'rxjs'; export class AppComponent { @@ -160,7 +155,7 @@ Available options based on lightbox2 options 1. Override default config ```javascript -import { LightboxConfig } from 'ngx-lightbox'; +import { LightboxConfig } from '@pierresh/ngx-lightbox'; export class AppComponent { constructor(private _lightboxConfig: LightboxConfig) { @@ -173,7 +168,7 @@ export class AppComponent { 2. Set config in a specific opening window ```javascript -import { LightboxConfig, Lightbox } from 'ngx-lightbox'; +import { LightboxConfig, Lightbox } from '@pierresh/ngx-lightbox'; export class AppComponent { constructor(private _lightboxConfig: LightboxConfig, private _lightbox: Lightbox) {} @@ -211,12 +206,4 @@ This project works with universal out of the box with no additional configuratio MIT -## Donation - -Buy me a beer if you like - -BTC: 1MFx5waJ7Sitn961DaXe3mQXrb7pEoSJct - -ETH: 0x2211F3d683eB1C2d753aD21D9Bd9110729C80B72 -NEO: ARrUrnbq1ogfsoabvCgJ5SHgknhzyUmtuS diff --git a/package-lock.json b/package-lock.json index 2d0a7c3..b5ae26b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "ngx-lightbox", - "version": "3.0.0", + "name": "@pierresh/ngx-lightbox", + "version": "17.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ngx-lightbox", - "version": "3.0.0", + "name": "@pierresh/ngx-lightbox", + "version": "17.0.0", "license": "MIT", "dependencies": { "file-saver": "^2.0.5", diff --git a/package.json b/package.json index 8abbaa5..16ab8f3 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "ngx-lightbox", - "version": "3.0.0", - "description": "A port >= angular5 for lightbox2", + "name": "@pierresh/ngx-lightbox", + "version": "17.0.1", + "description": "A port >= Angular 17 for lightbox2", "main": "index.js", "dependencies": { "file-saver": "^2.0.5", @@ -39,7 +39,7 @@ "build": "./node_modules/.bin/ng build", "test": " ./node_modules/.bin/ng lint && ./node_modules/.bin/ng test", "lint": "./node_modules/.bin/ng lint", - "prepublishOnly": "./node_modules/.bin/ngc && ./node_modules/.bin/copyfiles -u 1 src/img/* src/*.js src/*.d.ts src/*.js.map src/*.metadata.json src/*.css .", + "prepublishOnly": "rm -r ./.angular && ./node_modules/.bin/ngc && ./node_modules/.bin/copyfiles -u 1 src/img/* src/*.js src/*.d.ts src/*.js.map src/*.metadata.json src/*.css .", "postpublish": "./node_modules/.bin/del '*.{service,component,module,spec,ngfactory}.js' '*.{metadata,ngsummary}.json' index.js webpack.config.js '*.{ts,css,map}' '{compiled,img}' 'src/*.{d.ts,ngfactory.ts,js,map,json}'" }, "repository": {