Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liberty #1

Merged
merged 16 commits into from
Oct 12, 2024
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: NPM Publish

on:
push:
tags:
- '*'

jobs:
publish:
name: publish
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Use Node.js v16
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # tag=v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.yarnpkg.com/

- name: Install Dependencies
run: |
yarn --immutable

- name: Build Library
run: yarn build && yarn build:schematics

- name: Publish
run: |
for d in dist/*; do
pushd $d

npm publish

popd
done
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
23 changes: 18 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@
"index": "projects/demo/src/index.html",
"polyfills": ["zone.js"],
"tsConfig": "projects/demo/tsconfig.app.json",
"assets": ["projects/demo/src/favicon.ico", "projects/demo/src/assets"],
"styles": ["projects/demo/src/styles.scss"],
"assets": [
"projects/demo/src/favicon.ico",
"projects/demo/src/assets"
],
"styles": [
"projects/demo/src/styles.scss"
],
"scripts": [],
"extractLicenses": false,
"sourceMap": true,
Expand Down Expand Up @@ -123,15 +128,23 @@
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "projects/demo/tsconfig.spec.json",
"karmaConfig": "projects/demo/karma.conf.js",
"assets": ["projects/demo/src/favicon.ico", "projects/demo/src/assets"],
"styles": ["projects/demo/src/styles.scss"],
"assets": [
"projects/demo/src/favicon.ico",
"projects/demo/src/assets"
],
"styles": [
"projects/demo/src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["projects/demo/**/*.ts", "projects/demo/**/*.html"]
"lintFilePatterns": [
"projects/demo/**/*.ts",
"projects/demo/**/*.html"
]
}
},
"e2e": {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fortawesome/angular-fontawesome",
"version": "0.15.0",
"name": "@libertymp/angular-fontawesome",
"version": "2.0.0",
"description": "Angular Fontawesome, an Angular library",
"scripts": {
"test": "ng test angular-fontawesome --watch=false --browsers=ChromeCI",
Expand All @@ -19,13 +19,13 @@
},
"repository": {
"type": "git",
"url": "https://github.com/FortAwesome/angular-fontawesome"
"url": "https://github.com/liberty-mp/angular-fontawesome"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/FortAwesome/angular-fontawesome/issues"
"url": "https://github.com/liberty-mp/angular-fontawesome/issues"
},
"homepage": "https://github.com/FortAwesome/angular-fontawesome",
"homepage": "https://github.com/liberty-mp/angular-fontawesome",
"devDependencies": {
"@angular-devkit/build-angular": "patch:@angular-devkit/build-angular@npm%3A18.0.1#~/.yarn/patches/@angular-devkit-build-angular-npm-18.0.1-51eee52196.patch",
"@angular-devkit/core": "^18.0.1",
Expand Down
7 changes: 7 additions & 0 deletions src/lib/icon/icon.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export class FaIconComponent implements OnChanges {
*/
@Input() a11yRole: string;

/**
* Specify the `id` attribute for the rendered <svg> element.
*
*/
@Input() svgId: string;

@HostBinding('innerHTML') renderedIconHTML: SafeHtml;

private document = inject(DOCUMENT);
Expand Down Expand Up @@ -156,6 +162,7 @@ export class FaIconComponent implements OnChanges {
symbol: this.symbol,
attributes: {
role: this.a11yRole,
id: this.svgId,
},
};
}
Expand Down
Loading
Loading