Skip to content

Commit

Permalink
chore: make components standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
thekhegay committed Jul 9, 2024
1 parent d795cce commit 5086afc
Show file tree
Hide file tree
Showing 24 changed files with 3,175 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9.11

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -33,7 +33,7 @@ jobs:
run: pnpm install

- name: Build showcase
run: pnpm build showcase
run: pnpm build:showcase

- name: Deploy
uses: easingthemes/ssh-deploy@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9.11

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Create release
name: Make release

on:
workflow_dispatch:
inputs:
mode:
description: 'Release version type'
description: 'Release type'
required: true
type: choice
default: 'minor'
default: 'patch'
options:
- patch
- minor
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
version: 9.11

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down Expand Up @@ -70,14 +70,14 @@ jobs:
delete-branch: true
token: ${{ secrets.GITHUB_TOKEN }}
branch: release/${{ steps.run-release.outputs.new_version }}
title: 'Release/v${{ steps.run-release.outputs.new_version }}'
title: '🚀 Release v${{ steps.run-release.outputs.new_version }}'
body: |
${{ steps.get-pr-body.outputs.body }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1.14.0
with:
name: Release ${{ steps.generate_body.outputs.tag_name }}
name: ${{ steps.generate_body.outputs.tag_name }}
tag: ${{ steps.generate_body.outputs.tag_name }}
body: ${{ steps.get-pr-body.outputs.body }}
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
engine-strict=true
update-notifier=false

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <img src="projects/showcase/public/images/logo.svg" alt="ngwr logo" height="32px">
# <img src="https://ngwr.dev/assets/images/logo.svg" alt="ngwr logo" height="32px">

[![ngwr deploy](https://img.shields.io/github/actions/workflow/status/thekhegay/ngwr/deploy.yml)](https://github.com/thekhegay/ngwr/actions/workflows/deploy.yml)
[![ngwr version](https://img.shields.io/github/package-json/v/thekhegay/ngwr?filename=projects%2Flib%2Fpackage.json&color=%23f51c6a)](https://www.npmjs.com/package/ngwr)
Expand Down
60 changes: 47 additions & 13 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,47 @@
}
},
"defaultConfiguration": "production"
},
"generate-icons": {
"builder": "@angular-extensions/svg-icons-builder:svg-icons-constants-builder",
"options": {
"conversionType": "constants",
"delimiter": "KEBAB",
"fileName": "icons",
"generateType": true,
"typeName": "wrIconName",
"generateTypeObject": false,
"exportCompleteIconSet": true,
"generateCompleteIconSet": true,
"completeIconSetName": "wrIconSet",
"prefix": "",
"interfaceName": "WrIcon",
"srcFiles": ["./projects/lib/icon/_svg/**/*.svg"],
"outputDirectory": "./projects/lib/icon/",
"compileSources": true,
"svgoConfig": {
"plugins": [
"preset-default",
"convertStyleToAttrs",
{
"name": "addClassesToSVGElement",
"params": {
"className": "wr-icon__svg"
}
},
{
"name": "convertColors",
"params": {
"currentColor": true,
"names2hex": false,
"rgb2hex": false,
"shorthex": false,
"shortname": false
}
}
]
}
}
}
}
},
Expand Down Expand Up @@ -67,23 +108,16 @@
"styles": [
"projects/showcase/styles.scss"
],
"allowedCommonJsDependencies": [
"js-beautify"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
}
],
"outputHashing": "all"
"outputHashing": "all",
"extractLicenses": false,
"sourceMap": false
},
"development": {
"optimization": false,
Expand Down
44 changes: 42 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
"private": true,
"scripts": {
"dev": "ng serve --o",
"build": "ng build",
"test": "ng test",
"lint": "ng lint"
"lint": "ng lint",
"release:patch": "tsx ./scripts/release.ts --release-as=patch",
"release:minor": "tsx ./scripts/release.ts --release-as=minor",
"release:major": "tsx ./scripts/release.ts --release-as=major",
"build:lib": "tsx ./scripts/build-lib.ts",
"build:showcase": "tsx ./scripts/build-showcase.ts",
"publish:lib": "tsx ./scripts/publish.ts"
},
"packageManager": "pnpm@9.1.1+sha256.9551e803dcb7a1839fdf5416153a844060c7bce013218ce823410532504ac10b",
"engines": {
Expand All @@ -23,6 +28,7 @@
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"chalk": "^5.3.0",
"highlight.js": "^11.9.0",
"js-beautify": "^1.15.1",
"ngx-highlightjs": "^12.0.0",
Expand All @@ -32,12 +38,16 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.2",
"@angular-extensions/svg-icons-builder": "^11.0.0",
"@angular/cli": "^18.0.2",
"@angular/compiler-cli": "^18.0.0",
"@eslint/js": "^9.5.0",
"@semantic-release/release-notes-generator": "^14.0.1",
"@types/jasmine": "~5.1.0",
"@types/js-beautify": "^1.14.3",
"@types/node": "^20.14.8",
"angular-eslint": "18.0.1",
"commit-and-tag-version": "^12.4.1",
"eslint": "^9.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import-x": "^0.5.2",
Expand All @@ -50,7 +60,37 @@
"karma-jasmine-html-reporter": "~2.1.0",
"ng-packagr": "^18.0.0",
"prettier": "3.3.2",
"tsx": "^4.16.2",
"typescript": "~5.4.2",
"typescript-eslint": "8.0.0-alpha.20"
},
"commit-and-tag-version": {
"scripts": {
"postbump": "tsx ./scripts/postbump.ts"
},
"packageFiles": [
"projects/lib/package.json"
],
"bumpFiles": [
{
"filename": "projects/lib/package.json",
"type": "json"
}
],
"header": "# Changelog",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "deprecate",
"section": "Deprecated"
}
]
}
}
Loading

0 comments on commit 5086afc

Please sign in to comment.