Skip to content

Commit

Permalink
Merge pull request #191 from MurhafSousli/master
Browse files Browse the repository at this point in the history
deploy demo to netlify
  • Loading branch information
MurhafSousli committed Aug 28, 2021
2 parents 5dea4b6 + 64d43a3 commit 763a601
Show file tree
Hide file tree
Showing 24 changed files with 431 additions and 367 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ What behavior did you actually see?
#### Environment

- Angular:
- ngx-scrollbar:
- ngx-highlightjs:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
2 changes: 1 addition & 1 deletion .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
node-version: 14
- name: Install dependencies
run: npm install
run: npm ci
- name: Build
run: npm run build-lib
- name: Test
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ jobs:
with:
node-version: 14
- name: Install dependencies
run: npm install
- name: Build and link library
run: npm run build-lib && npm run link-lib
run: npm ci
- name: Build demo
run: npm run build-demo
- name: Deploy to Netlify
Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# Changelog

## 5.0.0

- Upgrade usage to highlight.js v11, you can find the breaking changes from the official page [here](https://highlightjs.readthedocs.io/en/latest/upgrade-11.html).
- Build the library with partial compilationMode.
- feat: Add the missing functions from v11 in `HighlightJS` service.
- Remove deprecated function in v11, such as `initHighlighting()`, `highlightBlock()`, `fixMarkup()` from `HighlightJS` service.

### Breaking changes

- refactor: `(highlighted)` output has been updated to highlight.js v11, the result object has a new interface `HighlightAutoResult`.
- refactor: `HighlightJS.configure(config)` has been updated the config interface to highlight.js v11.

## 4.1.4

- Upgrade to Angular 12
- Set peer dependency of hljs to v10
- Set peer dependency of highlight.js to v10

> The library is still compatible with the new version of highlight.js v11 but the highlighting function will be deprecated in their next release
## 4.1.3

Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Murhaf Sousli
Copyright (c) 2018-2021 Murhaf Sousli

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ The following line will highlight the given code and append it to the host eleme
| **[highlight]** | string | Accept code string to highlight, default `null` |
| **[languages]** | string[] | An array of language names and aliases restricting auto detection to only these languages, default: `null` |
| **[lineNumbers]** | boolean | A flag that indicates adding line numbers to highlighted code element |
| **(highlighted)** | HighlightResult | Stream that emits the result object when element is highlighted |
| **(highlighted)** | HighlightAutoResult | Stream that emits the result object when element is highlighted |


### NOTE
Expand Down
24 changes: 18 additions & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/ngx-highlight'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
Expand All @@ -36,7 +48,7 @@ module.exports = function (config) {
restartOnFileChange: true,
capabilities: {
chromeOptions: {
args: [ "--headless" ]
args: ["--headless"]
},
'browserName': 'chrome'
},
Expand Down
Loading

1 comment on commit 763a601

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.