Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://github.com/browserslist/browserslist#readme

last 2 major versions
Firefox ESR
not dead
not IE 9-11
not kaios <= 2.5
not op_mini all
54 changes: 54 additions & 0 deletions .github/workflows/publish-oidc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow will run tests using node and then publish a package to npm when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Publish with OIDC

on:
workflow_dispatch:
# release:
# types: [created]

permissions:
id-token: write # Required for OIDC
contents: read

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
# build:
# uses: ./.github/workflows/build.yml

publish-npm:
# needs: build
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20.19.5]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: npm

# Ensure npm 11.5.1 or later is installed

- name: Update npm
run: npm install -g npm@latest

- name: Install dependencies
run: npm ci

- name: Run build only library
run: npm run build:prod --if-present

- name: Publish package
run: npm publish ./dist/angular-tree-component
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run tests using node and then publish a package to npm when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Publish
name: Node.js Publish with Granular Token

on:
workflow_dispatch:
Expand Down
26 changes: 9 additions & 17 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"builder": "@angular/build:ng-packagr",
"options": {
"project": "projects/angular-tree-component/ng-package.json"
},
Expand Down Expand Up @@ -43,11 +43,13 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular/build:application",
"options": {
"outputPath": "dist/demo",
"outputPath": {
"base": "dist/demo",
"browser": ""
},
"index": "projects/demo/src/index.html",
"main": "projects/demo/src/main.ts",
"polyfills": [
"zone.js"
],
Expand All @@ -61,23 +63,13 @@
"styles": [
"projects/demo/src/styles.scss"
],
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
],
"allowedCommonJsDependencies": [
"mobx"
]
],
"browser": "projects/demo/src/main.ts"
},
"configurations": {
"production": {
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all"
},
"development": {
Expand All @@ -89,7 +81,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "demo:build:production"
Expand Down
Loading