Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions packages/ng-fantasticon/src/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/ng-form/src/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"error",
{
"type": "element",
"prefix": "ng-auth",
"prefix": "ngx-auth",
"style": "kebab-case"
}
]
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/ng-auth/README.md → packages/ngx-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ng-auth
# ngx-auth

An Angular library to ease the authentication integration with a backend.

Expand Down Expand Up @@ -34,7 +34,7 @@ As usual, not storing anything is the safest choice, but usually also not the be
## Installation

```shell
npm install --save @zupit-it/ng-auth
npm install --save @zupit-it/ngx-auth
```

## Setup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable */
export default {
displayName: 'ng-auth',
displayName: 'ngx-auth',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/packages/ng-auth',
coverageDirectory: '../../coverage/packages/ngx-auth',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/packages/ng-form",
"dest": "../../dist/packages/ngx-auth",
"lib": {
"entryFile": "src/index.ts"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@zupit-it/ng-auth",
"name": "@zupit-it/ngx-auth",
"version": "16.2.5",
"peerDependencies": {
"@angular/common": "^16.0.0",
Expand Down
20 changes: 10 additions & 10 deletions packages/ng-auth/project.json → packages/ngx-auth/project.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "ng-auth",
"name": "ngx-auth",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "packages/ng-auth/src",
"sourceRoot": "packages/ngx-auth/src",
"prefix": "app",
"targets": {
"build": {
"executor": "@nx/angular:ng-packagr-lite",
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
"options": {
"project": "packages/ng-auth/ng-package.json",
"project": "packages/ngx-auth/ng-package.json",
"updateBuildableProjectDepsInPackageJson": true
},
"configurations": {
"production": {
"tsConfig": "packages/ng-auth/tsconfig.lib.prod.json"
"tsConfig": "packages/ngx-auth/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/ng-auth/tsconfig.lib.json"
"tsConfig": "packages/ngx-auth/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
Expand All @@ -27,7 +27,7 @@
"options": {
"commands": [
{
"command": "npx nx format:check --projects ng-auth"
"command": "npx nx format:check --projects ngx-auth"
}
],
"parallel": false
Expand All @@ -38,16 +38,16 @@
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"packages/ng-auth/**/*.ts",
"packages/ng-auth/**/*.html"
"packages/ngx-auth/**/*.ts",
"packages/ngx-auth/**/*.html"
]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "packages/ng-auth/jest.config.ts",
"jestConfig": "packages/ngx-auth/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand All @@ -61,7 +61,7 @@
"executor": "@jscutlery/semver:version",
"options": {
"preset": "conventional",
"postTargets": ["ng-auth:release:github", "ng-auth:publish"],
"postTargets": ["ngx-auth:release:github", "ngx-auth:publish"],
"push": true
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './lib/ng-auth.module'
export * from './lib/ngx-auth.module'
export * from './lib/interfaces'
export * from './lib/providers/authentication.provider'
export * from './lib/providers/storage.provider'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"error",
{
"type": "element",
"prefix": "ng-fantasticon",
"prefix": "ngx-fantasticon",
"style": "kebab-case"
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ng-fantasticon
# ngx-fantasticon

This library provides a helper component for the [@zupit-it/fantasticon](https://www.npmjs.com/package/@zupit-it/fantasticon) package. It allows you to easily use the icons generated by `zupit-fantasticon` in your Angular application.

Expand All @@ -8,25 +8,25 @@ Install [@zupit-it/fantasticon](https://www.npmjs.com/package/@zupit-it/fantasti

## Usage

You can use the `NgFantasticonComponent` to display the icons in your Angular application.
First you will need to import the `NgFantasticonModule` and to provide your `Icons` enum generated by `zupit-fantasticon` via the `forRoot()` function:
You can use the `NgxFantasticonComponent` to display the icons in your Angular application.
First you will need to import the `NgxFantasticonModule` and to provide your `Icons` enum generated by `zupit-fantasticon` via the `forRoot()` function:

`app.module.ts`:

```typescript
import { Icons } from '../path-to-your-icons-enum'
import { NgFantasticonModule } from '@zupit-it/ng-fantasticon'
import { NgxFantasticonModule } from '@zupit-it/ngx-fantasticon'

@NgModule({
imports: [NgFantasticonModule.forRoot(Icons)]
imports: [NgxFantasticonModule.forRoot(Icons)]
})
export class AppModule {}
```

Then you can use the `ng-fantasticon` component in your templates:
Then you can use the `ngx-fantasticon` component in your templates:

```html
<ng-fantasticon [icon]="Icons.MyIcon"></ng-fantasticon>
<ngx-fantasticon [icon]="Icons.MyIcon"></ngx-fantasticon>
```

If you don't provide a valid icon (i.e. an icon that is not in the enum), the component will not be displayed and an error will be thrown in the console.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable */
export default {
displayName: 'ng-fantasticon',
displayName: 'ngx-fantasticon',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../coverage/packages/ng-fantasticon',
coverageDirectory: '../../coverage/packages/ngx-fantasticon',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/packages/ng-fantasticon",
"dest": "../../dist/packages/ngx-fantasticon",
"lib": {
"entryFile": "src/index.ts"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@zupit-it/ng-fantasticon",
"name": "@zupit-it/ngx-fantasticon",
"version": "0.1.1",
"peerDependencies": {
"@angular/common": "^16.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ng-fantasticon",
"name": "ngx-fantasticon",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/ng-fantasticon/src",
"sourceRoot": "packages/ngx-fantasticon/src",
"prefix": "zupit-it",
"tags": [],
"projectType": "library",
Expand All @@ -10,14 +10,14 @@
"executor": "@nx/angular:ng-packagr-lite",
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
"options": {
"project": "packages/ng-fantasticon/ng-package.json"
"project": "packages/ngx-fantasticon/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/ng-fantasticon/tsconfig.lib.prod.json"
"tsConfig": "packages/ngx-fantasticon/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/ng-fantasticon/tsconfig.lib.json"
"tsConfig": "packages/ngx-fantasticon/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
Expand All @@ -27,7 +27,7 @@
"options": {
"commands": [
{
"command": "npx nx format:check --projects ng-fantasticon"
"command": "npx nx format:check --projects ngx-fantasticon"
}
],
"parallel": false
Expand All @@ -38,17 +38,17 @@
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"packages/ng-fantasticon/**/*.ts",
"packages/ng-fantasticon/**/*.html",
"packages/ng-fantasticon/package.json"
"packages/ngx-fantasticon/**/*.ts",
"packages/ngx-fantasticon/**/*.html",
"packages/ngx-fantasticon/package.json"
]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "packages/ng-fantasticon/jest.config.ts",
"jestConfig": "packages/ngx-fantasticon/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand All @@ -63,8 +63,8 @@
"options": {
"preset": "conventional",
"postTargets": [
"ng-fantasticon:release:github",
"ng-fantasticon:publish"
"ngx-fantasticon:release:github",
"ngx-fantasticon:publish"
],
"push": true
}
Expand Down
2 changes: 2 additions & 0 deletions packages/ngx-fantasticon/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './lib/ngx-fantasticon.module'
export * from './lib/components/ngx-fantasticon.component'
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const ICONS_NAMES = new InjectionToken<Set<string>>(
)

@Component({
selector: 'ng-fantasticon',
templateUrl: './ng-fantasticon.component.html',
styleUrls: ['./ng-fantasticon.component.scss']
selector: 'ngx-fantasticon',
templateUrl: './ngx-fantasticon.component.html',
styleUrls: ['./ngx-fantasticon.component.scss']
})
export class NgFantasticonComponent {
export class NgxFantasticonComponent {
private _icon: string

@Input() set icon(value: string) {
Expand Down
Loading