Skip to content

Commit

Permalink
refactor!: migrate to NG17, playwright, BDD (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylannnn committed May 3, 2024
1 parent 7fd4781 commit 522e314
Show file tree
Hide file tree
Showing 66 changed files with 18,523 additions and 25,904 deletions.
2 changes: 1 addition & 1 deletion .compodocrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: NgxMultiKeywordsHighlighter Documentation
# Configurations: https://compodoc.app/guides/options.html
tsconfig: tsconfig.doc.json
theme: material
version: 1.0.0
version: 1.3.0
# language: en-US
customFavicon: tools/assets/favicon.ico
customLogo: tools/assets/logo-light.svg
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
apps/**-e2e/.feature-generate-bdd/**/*.spec.js
42 changes: 0 additions & 42 deletions .github/workflows/release-develop.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/release-feature.yml

This file was deleted.

16 changes: 11 additions & 5 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- main
- develop
- beta
- next
permissions:
contents: read

Expand All @@ -28,20 +26,28 @@ jobs:
node-version: 18
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Cache NPM packages
id: cache-npm-packages
uses: actions/cache@v3
env:
cache-name: cache-npm-packages
with:
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-npm-packages.outputs.cache-hit != 'true' }}
run: npm ci --ignore-scripts
- name: Config Git User
run: |
git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}"
git config --global user.name "${{ vars.RELEASE_USER_NAME }}"
- name: Clean Install
run: npm ci
- name: Lint
run: npm run mkh:lint
- name: Test
run: npm run mkh:test
- name: Build
run: npm run mkh:build
- name: Semantic Release 📦
run: npx semantic-release
run: npx nx release --dry-run --first-release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
42 changes: 0 additions & 42 deletions .github/workflows/release-next.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ docker/verdaccio/conf/storage/**/*
# Storybook
build-storybook.log
.nx
.nx/cache
.nx/cache

# BDD
/apps/**-e2e/.feature-generate-bdd
36 changes: 36 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# path to a directory with all packages
storage: ../.nx/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m
localhost:
url: http://localhost:4873/
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs
"@amfrontender/*":
access: $all
publish: $all
unpublish: $all
proxy: localhost

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
16 changes: 16 additions & 0 deletions .verdaccio/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "verdaccio",
"$schema": "node_modules/nx/schemas/project-schema.json",
"targets": {
"start": {
"executor": "@nx/js:verdaccio",
"options": {
"port": 4873,
"config": "{projectRoot}/config.yml",
"storage": "{workspaceRoot}/.nx/local-registry/storage",
"location": "user",
"clear": true
}
}
}
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"nrwl.angular-console",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"ms-playwright.playwright"
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
},
"editor.formatOnSave": true
},
"CodeGPT.apiKey": "Ollama",
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 3.0.0 (2024-05-03)


### 🚀 Features

- semantic release config adjustment (MKH-28) ([#49](https://github.com/dylannnn/ngx-multi-keywords-highlighter/pull/49))
- **pipeline:** align release version ([#51](https://github.com/dylannnn/ngx-multi-keywords-highlighter/pull/51))
- **pipeline:** fix and align release version ([#53](https://github.com/dylannnn/ngx-multi-keywords-highlighter/pull/53))

### 🩹 Fixes

- semantic release version adjustment for lib ([#51](https://github.com/dylannnn/ngx-multi-keywords-highlighter/pull/51))

### ❤️ Thank You

- Yunfei Li @dylannnn
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# NgxMultiKeywordsHighlighterWorkspace
# Ngx Multi Keywords Highlighter Workspace

[![ngx-multi-keywords-highlighter-e2e](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/2dbycs&style=flat&logo=cypress)](https://cloud.cypress.io/projects/2dbycs/runs)
![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)
![npm (scoped)](https://img.shields.io/npm/v/%40amfrontender/ngx-multi-keywords-highlighter)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/dylannnn/ngx-multi-keywords-highlighter)
[![Publish NGX Multi Keywords Highlighter](https://github.com/dylannnn/ngx-multi-keywords-highlighter/actions/workflows/release-main.yml/badge.svg)](https://github.com/dylannnn/ngx-multi-keywords-highlighter/actions/workflows/release-main.yml)

<!-- TODO Fix this badge -->
[![Publish NGX Multi Keywords Highlighter](https://github.com/dylannnn/ngx-multi-keywords-highlighter/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/dylannnn/ngx-multi-keywords-highlighter/actions/workflows/npm-publish.yml)
## Screenshort

![NGX Multi Keywords Highlighter](tools/assets/multi-keywords-highlighter.png "NGX Multi Keywords Highlighter")

## How to use

Expand All @@ -20,20 +24,20 @@ Add `NgxMultiKeywordsHighlighterModule` config to the imports
```typescript
@NgModule({
declarations: [...],
imports: [
BrowserModule,
BrowserAnimationsModule,
NgxMultiKeywordsHighlighterModule.forRoot({
themeColor: MATERIAL_COLOR.PRIMARY,
enableToggleLabel: true,
toggleLabelPosition: LABEL_POSITION.BEFORE,
enableHighlighterTooltip: 'Turn on/off highlighter',
minWidth: 320,
appRoot: 'mkh-root',
}),
...
providers: [
provideAnimations(),
importProvidersFrom(
NgxMultiKeywordsHighlighterModule.forRoot({
themeColor: MATERIAL_COLOR.ACCENT,
enableToggleLabel: true,
toggleLabelPosition: LABEL_POSITION.BEFORE,
enableHighlighterTooltip: 'On/Off',
linkToCopyright: true,
minWidth: 320,
appRoot: storyRoot,
}),
),
],
providers: [...],
bootstrap: [...],
})
export class AppModule {}
Expand Down
17 changes: 0 additions & 17 deletions apps/demo-e2e/.eslintrc.json

This file was deleted.

13 changes: 0 additions & 13 deletions apps/demo-e2e/cypress.config.ts

This file was deleted.

30 changes: 0 additions & 30 deletions apps/demo-e2e/project.json

This file was deleted.

Loading

0 comments on commit 522e314

Please sign in to comment.