Skip to content

Commit

Permalink
chore(readme): minor improvements added
Browse files Browse the repository at this point in the history
  • Loading branch information
Celtian committed Dec 26, 2023
1 parent 7e21e54 commit 8cb87af
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 46 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,82 +11,82 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: 🗜️ Checkout
uses: actions/checkout@v3

- name: Setup node version
- name: 🗜️ Setup node version
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Install
- name: 🛠️ Install
uses: ./.github/actions/cached-deps

- name: Lint
- name: 🌡️ Lint
run: yarn lint

- name: Sync versions # Sync versions
- name: 🛠️ Sync versions # Sync versions
run: yarn syncprojects

- name: Build demo app # Build Schematics and move
- name: 📦 Build demo app # Build Schematics and move
run: yarn build:demo --base-href https://celtian.github.io/ngx-translate-version/

- name: Build ngx-translate-version # Build
- name: 📦 Build ngx-translate-version # Build
run: yarn build

# - name: Run tests
# - name: 🧪 Run tests
# run: yarn test --code-coverage --configuration=ci

# - name: Upload coverage reports
# - name: ⬆️ Upload coverage reports
# uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
# fail_ci_if_error: true
# verbose: false
# dry_run: false

- name: Publish NPM
- name: 🚀 Publish NPM
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: cd dist/ngx-translate-version && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Publish NPM BETA
- name: 🚀 Publish NPM BETA
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == true
run: cd dist/ngx-translate-version && npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Publish to GitHub Package Registry
- name: Set up package for GPR
- name: 🛠️ Set up package for GPR
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: yarn gpr:setup

- name: Use GPR
- name: 🛠️ Use GPR
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
scope: '@celtian'

- name: Publish to GitHub Package Registry
- name: 🚀 Publish to GitHub Package Registry
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: |
cd dist/ngx-translate-version
npm publish
env:
NODE_AUTH_TOKEN: ${{github.token}}

- name: Copy index.html to 404.html
- name: 🛠️ Copy index.html to 404.html
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: cp ./dist/demo/index.html ./dist/demo/404.html
run: cp ./dist/demo/browser/index.html ./dist/demo/browser/404.html

- name: Deploy Github Pages
- name: 🚀 Deploy Github Pages
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./dist/demo
publish_dir: ./dist/demo/browser
18 changes: 9 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: 🗜️ Checkout
uses: actions/checkout@v3

- name: Setup node version
- name: 🗜️ Setup node version
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Install
- name: 🛠️ Install
uses: ./.github/actions/cached-deps

- name: Lint
- name: 🌡️ Lint
run: yarn lint

- name: Sync versions # Sync versions
- name: 🛠️ Sync versions # Sync versions
run: yarn syncprojects

- name: Build demo app # Build Schematics and move
- name: 📦 Build demo app # Build Schematics and move
run: yarn build:demo --base-href https://celtian.github.io/ngx-translate-version/

- name: Build ngx-translate-version # Build
- name: 📦 Build ngx-translate-version # Build
run: yarn build

# - name: Run tests
# - name: 🧪 Run tests
# run: yarn test --configuration=ci

# - name: Upload coverage reports
# - name: ⬆️ Upload coverage reports
# uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

> Angular module that provides version to your language files
> _Angular 16, Ivy and SSR compatible_
> _Angular 17 compatible_
Here's the [demo](http://celtian.github.io/ngx-translate-version/)

Expand Down Expand Up @@ -57,16 +57,17 @@ yarn add ngx-translate-version

| Angular | ngx-translate-version | Install |
| ------- | --------------------- | ---------------------------------- |
| 16 | 1.x | `yarn add ngx-translate-version` |
| 17 | 2.x | `yarn add ngx-translate-version` |
| 16 | 1.x | `yarn add ngx-translate-version@1` |
| 15 | 0.x | `yarn add ngx-translate-version@0` |

## Peer Dependencies

```
"@angular/common": ">=16",
"@angular/core": ">=16",
"@angular/common": ">=17",
"@angular/core": ">=17",
"@gilsdav/ngx-translate-router-http-loader": ">=2",
"@gilsdav/ngx-translate-router": ">=6",
"@gilsdav/ngx-translate-router": ">=7",
"@ngx-translate/core": ">=15",
"@ngx-translate/http-loader": ">=8"
```
Expand Down
12 changes: 5 additions & 7 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/demo",
"index": "projects/demo/src/index.html",
"main": "projects/demo/src/main.ts",
"polyfills": "projects/demo/src/polyfills.ts",
"browser": "projects/demo/src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "projects/demo/tsconfig.app.json",
"assets": [
"projects/demo/src/favicon.ico",
Expand All @@ -75,9 +77,7 @@
"projects/demo/src/styles.scss"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
Expand All @@ -95,8 +95,6 @@
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"start": "ng build ngx-translate-version --watch",
"build:demo": "ng build demo --configuration production",
"build": "ng build ngx-translate-version --configuration production",
"deploy:ghpages": "yarn build && yarn build:demo && ngh --dir=dist/demo",
"deploy:ghpages": "yarn build && yarn build:demo && ngh --dir=dist/demo/browser",
"publish:npmjs": "yarn syncprojects && yarn build && npm publish --folder dist/ngx-translate-version",
"gpr:setup": "yarn ts-node --project scripts/tsconfig.ts-node.json scripts/gpr-setup",
"test": "ng test",
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { VERSION } from '../environments/version';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
styleUrl: './app.component.scss'
})
export class AppComponent {
public title = 'ngx-translate-version';
Expand Down
10 changes: 5 additions & 5 deletions projects/ngx-translate-version/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"license": "MIT",
"description": "Angular module that provides version to your language files",
"peerDependencies": {
"@angular/common": ">=16",
"@angular/core": ">=16",
"@angular/common": ">=17",
"@angular/core": ">=17",
"@gilsdav/ngx-translate-router-http-loader": ">=2",
"@gilsdav/ngx-translate-router": ">=6",
"@gilsdav/ngx-translate-router": ">=7",
"@ngx-translate/core": ">=15",
"@ngx-translate/http-loader": ">=8"
},
Expand All @@ -36,6 +36,6 @@
"version"
],
"engines": {
"node": ">=14"
"node": ">=18"
}
}
}

0 comments on commit 8cb87af

Please sign in to comment.