Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
MurhafSousli committed Mar 28, 2024
1 parent 97b7a28 commit ef2d6e4
Show file tree
Hide file tree
Showing 88 changed files with 9,938 additions and 19,009 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": {}
}
]
}
11 changes: 11 additions & 0 deletions .github/FUNDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# These are supported funding model platforms

github: murhafsousli
patreon: murhaf
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with a single custom sponsorship URL
44 changes: 41 additions & 3 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
uses: actions/setup-node@master
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
3 changes: 3 additions & 0 deletions .github/workflows/netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
run: npm ci
- name: Build demo
run: npm run build-demo
env:
GIST_CLIENT_ID: ${{ secrets.GIST_CLIENT_ID }}
GIST_CLIENT_SECRET: ${{ secrets.GIST_CLIENT_SECRET }}
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
Expand Down
25 changes: 11 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
# See http:https://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

.env
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:https://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http:https://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"
}
}
}
}
]
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 11.0.0-beta.1

- Update to Angular 17.
- feat: Add `provideHighlightOptions` function to easily override the default options.
- feat: Add `provideGistOptions` function in the plus package to easily set gist id and secret into the HTTP requests.
- feat: Add `startFrom` and `singleLine` inputs to `lineNumbers` directive, closes [#274](https://github.com/MurhafSousli/ngx-highlightjs/issues/274).
- feat: Make `codeFromUrl` pipe supports loading of relative URLs, closes [#224](https://github.com/MurhafSousli/ngx-highlightjs/issues/224).
- feat: Add `highlight` directive which uses a different function and provide different options, closes [#275](https://github.com/MurhafSousli/ngx-highlightjs/issues/275).
- feat: Add `lineNumbersOptions` property to set the default line number options.
- refactor: Rename the previous `highlight` directive to `highlightAuto`.
- refactor: split line numbers functionality into its own directive.
- refactor: Use `highlight.js` original interfaces.
- enhance: Allow loading theme from global options if `highlight.js` was imported externally.

### 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 ef2d6e4

Please sign in to comment.