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
27 changes: 16 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need all tags to get a version number in-between tags
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: yarn build-demo
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm build-demo
- uses: actions/upload-artifact@v4
with:
name: dist
Expand All @@ -23,33 +24,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: ./node_modules/.bin/ng test angular-natural-gallery --progress false --watch=false --browsers ChromeHeadlessCustom

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: yarn lint
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm lint

prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'yarn'
- run: yarn --frozen-lockfile
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: ./node_modules/.bin/prettier --experimental-cli --check .

release:
Expand All @@ -71,11 +75,12 @@ jobs:
- run: rm .gitignore

# Publish to npm
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- run: npm publish dist/angular-natural-gallery/
- run: pnpm publish --provenance --no-git-checks dist/angular-natural-gallery/

# Create release
- name: Get release info
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.angular/
/dist/
/pnpm-lock.yaml
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Thin wrapper for [@ecodev/natural-gallery-js](https://github.com/Ecodev/natural-
To install this library, run:

```bash
yarn add @ecodev/angular-natural-gallery
pnpm add @ecodev/angular-natural-gallery
```

## Consuming the library
Expand All @@ -30,13 +30,13 @@ export class AppComponent {}
To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:

```bash
$ yarn prod
$ pnpm prod
```

To lint all `*.ts` files:

```bash
$ yarn lint
$ pnpm lint
```

## License
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"prettier": "./node_modules/.bin/prettier --experimental-cli --check .",
"prettier-fix": "./node_modules/.bin/prettier --experimental-cli --write .",
"e2e": "ng e2e",
"build-lib": "ng build angular-natural-gallery && cp -v README.md dist/angular-natural-gallery/ && cp -vr projects/angular-natural-gallery/src/lib/styles dist/angular-natural-gallery/ && cd dist/angular-natural-gallery && yarn version --no-git-tag-version --new-version `git describe --tags --always`",
"build-demo": "yarn build-lib && ng build demo --aot --base-href /angular-natural-gallery/ && cp dist/demo/browser/index.html dist/demo/browser/404.html",
"build-lib": "ng build angular-natural-gallery && cp -v README.md dist/angular-natural-gallery/ && cp -vr projects/angular-natural-gallery/src/lib/styles dist/angular-natural-gallery/ && cd dist/angular-natural-gallery && pnpm version `git describe --tags --always`",
"build-demo": "pnpm build-lib && ng build demo --aot --base-href /angular-natural-gallery/ && cp dist/demo/browser/index.html dist/demo/browser/404.html",
"serve-demo": "echo '💡 open http://localhost:8000/angular-natural-gallery/' && mkdir -p dist/server && ln -fs ../demo/browser dist/server/angular-natural-gallery && php -S localhost:8000 -t dist/server/",
"llink": "cd dist/angular-natural-gallery && (yarn unlink ; yarn link)"
"llink": "cd dist/angular-natural-gallery && (pnpm unlink ; pnpm link)"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -40,7 +40,9 @@
"bugs": {
"url": "https://github.com/Ecodev/angular-natural-gallery/issues"
},
"packageManager": "pnpm@10.33.0",
"devDependencies": {
"@angular-eslint/builder": "^21.3.1",
"@angular/build": "^21.2.0",
"@angular/cli": "^21.2.0",
"@angular/common": "^21.2.0",
Expand All @@ -51,6 +53,7 @@
"@angular/platform-browser": "^21.2.0",
"@angular/router": "^21.2.0",
"@ecodev/natural-gallery-js": "^11.1.1",
"@eslint/js": "^10.0.1",
"@playwright/test": "^1.55.0",
"@types/jasmine": "~5.1.9",
"@types/node": "^22.14.1",
Expand All @@ -70,6 +73,5 @@
"typescript": "~5.9.2",
"typescript-eslint": "^8.29.1",
"zone.js": "~0.15.1"
},
"dependencies": {}
}
}
Loading
Loading