Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
MurhafSousli committed Mar 26, 2024
1 parent 97b7a28 commit 9cef96b
Show file tree
Hide file tree
Showing 80 changed files with 9,363 additions and 18,985 deletions.
12 changes: 0 additions & 12 deletions .browserslistrc

This file was deleted.

3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
}
]
}
42 changes: 40 additions & 2 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,61 @@
name: tests
name: CI Build

on:
pull_request:
branches: [ master ]
push:
branches: [ master ]

jobs:
build:
# Machine environment:
# We specify the Node.js version manually below, and use versioned Chrome from Puppeteer.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master

- name: Use Node.js 20
uses: actions/setup-node@v1
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build-lib

- name: Lint
run: npm run lint-lib

- name: Test
run: npm run test-lib-headless

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: MurhafSousli/ngx-highlightjs

- name: Code Coverage Report
uses: irongut/[email protected]
with:
filename: coverage/**/cobertura-coverage.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '60 80'

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

- name: Build demo (ssr)
run: npm run build-demo
23 changes: 9 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
# Compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
# Node
/node_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
npm-debug.log
yarn-error.log

# IDEs and editors
/.idea
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
# Miscellaneous
/.angular/cache
/.sass-cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
# System files
.DS_Store
Thumbs.db
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 11.0.0-beta.1

- Update to Angular 17.
- feat: Add `provideHighlightOptions` function to easily override the default options.
- feat: Add `startFrom` and `singleLine` inputs to line numbers.
- feat: Add `lineNumbersOptions` to set the default line number options.
- feat: Add `highlight` directive which uses a different function and has different options
- refactor: Rename the previous `highlight` directive to `highlightAuto`.
- refactor: split line numbers functionality into a separate directive.

### Breaking changes

- The `highlight` directive now uses a different function from highlight.js which requires selecting a language.
- The `highlightAuto` directive automatically detects the language and highlights the code.

## 10.0.0

- feat: Migrate to Angular standalone components, closes [#260](https://github.com/MurhafSousli/ngx-highlightjs/issues/260) in [cadcd11](https://github.com/MurhafSousli/ngx-highlightjs/pull/261/commits/cadcd11564adc23bda9d9a0f2bc6b9d26651bee1).
Expand Down
Loading

0 comments on commit 9cef96b

Please sign in to comment.