Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 9-11 # For IE 9-11 support, remove 'not'.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
version: 2.1
orbs:
browser-tools: circleci/browser-tools@1.1.0
jobs:
test:
docker:
- image: circleci/node:14-browsers
- image: cimg/node:current-browsers
environment:
CHROME_BIN: '/usr/bin/google-chrome'
steps:
- browser-tools/install-chrome
- checkout
- run:
name: npm-install
Expand All @@ -21,7 +24,7 @@ jobs:
command: bash <(curl -s https://codecov.io/bash)
release:
docker:
- image: circleci/node:14
- image: cimg/node:current
steps:
- checkout
- run: npm ci
Expand Down
34 changes: 34 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# ngx-codemirror [![npm](https://badgen.net/npm/v/@ctrl/ngx-codemirror)](https://www.npmjs.com/package/@ctrl/ngx-codemirror) [![CircleCI](https://badgen.net/circleci/github/scttcper/ngx-codemirror)](https://circleci.com/gh/scttcper/ngx-codemirror) [![coverage](https://badgen.net/codecov/c/github/scttcper/ngx-codemirror)](https://codecov.io/gh/scttcper/ngx-codemirror)

DEMO: https://ngx-codemirror.vercel.app
DEMO: https://ngx-codemirror.vercel.app

## Dependencies

Latest version available for each version of Angular

| @ctrl/ngx-codemirror | Angular |
| -------------------- | ------- |
| 1.3.10 | 6.x 7.x |
| 2.2.1 | 8.x |
| 3.1.3 | 9.x |
| current | >= 10.x |
| @ctrl/ngx-codemirror | Angular |
| -------------------- | --------- |
| 1.3.10 | 6.x 7.x |
| 2.2.1 | 8.x |
| 3.1.3 | 9.x |
| 4.1.1 | 10.x 11.x |
| current | >= 12.x |

An Angular component wrapper for [CodeMirror](https://codemirror.net/) that extends ngModel. Based on [JedWatson/react-codemirror](https://github.com/JedWatson/react-codemirror)

Expand Down Expand Up @@ -56,7 +57,7 @@ import 'codemirror/mode/markdown/markdown';

Import the base css file and your [theme](https://codemirror.net/demo/theme.html)

```scss
```css
@import '~codemirror/lib/codemirror';
@import '~codemirror/theme/material';
```
Expand Down
57 changes: 44 additions & 13 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
"style": "css"
},
"@schematics/angular:application": {
"strict": true
Expand All @@ -20,16 +20,28 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": ["codemirror"],
"allowedCommonJsDependencies": [
"codemirror"
],
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand All @@ -39,7 +51,16 @@
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"optimization": {
"scripts": true,
"fonts": {
"inline": true
},
"styles": {
"minify": true,
"inlineCritical": false
}
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
Expand Down Expand Up @@ -85,20 +106,30 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"defaultProject": "ngx-codemirror"
"defaultProject": "ngx-codemirror",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
}
}
Loading