Skip to content

Commit

Permalink
fix(ngx-codejar): line numbers not working with CodeJar >= 4
Browse files Browse the repository at this point in the history
BREAKING CHANGE: - Linenumbers feature was dropped in main CodeJar repository since v4.
You
have to install package codejar-linenumbers instead. <b>! changed installation instructions! </b>
- minimum
CodeJar version is 4 about now.

Closes #2
  • Loading branch information
julianpoemp committed Jul 31, 2023
1 parent 365a355 commit aef65c3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
5 changes: 4 additions & 1 deletion apps/demo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"polyfills": ["zone.js"],
"tsConfig": "apps/demo/tsconfig.app.json",
"assets": ["apps/demo/src/favicon.ico", "apps/demo/src/assets"],
"styles": ["node_modules/highlight.js/styles/github-dark.css", "node_modules/prismjs/themes/prism-dark.css","apps/demo/src/styles.scss"],
"styles": ["node_modules/highlight.js/styles/github-dark.css",
"node_modules/prismjs/themes/prism-dark.css","apps/demo/src/styles.scss",
"node_modules/codejar-linenumbers/es/codejar-linenumbers.css"
],
"scripts": []
},
"configurations": {
Expand Down
2 changes: 1 addition & 1 deletion libs/ngx-codejar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "5.2.0",
"description": "Angular wrapper for CodeJar supporting Prism.js and Highlight.js. With this you can easily add code-editors to your Angular app.",
"peerDependencies": {
"codejar": ">= 3.7.0",
"codejar": "^4.0.0",
"@angular/common": ">= 14.0.0",
"@angular/core": ">= 14.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion libs/ngx-codejar/src/lib/ngx-code-jar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '@angular/core';
import {CodeJar, Position} from 'codejar';
import {CodeJarContainer, CodeJarOptions} from './codejar.typings';
import {withLineNumbers} from 'codejar/linenumbers.js';
import {withLineNumbers} from 'codejar-linenumbers';
import {CommonModule} from '@angular/common';

@Component({
Expand Down
33 changes: 24 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"@angular/platform-browser-dynamic": "~15.2.0",
"@angular/router": "~15.2.0",
"@nrwl/angular": "15.9.4",
"codejar": "3.7.0",
"codejar": "^4.1.1",
"codejar-linenumbers": "^1.0.0",
"highlight.js": "^11.5.1",
"prismjs": "^1.28.0",
"rxjs": "~7.8.0",
Expand Down

0 comments on commit aef65c3

Please sign in to comment.