Skip to content

Commit b975854

Browse files
committed
Added @kephas/ngx-ace (former @kephas/angular-ace) - part 1
1 parent 31e5871 commit b975854

18 files changed

+307
-2
lines changed

src/angular.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,37 @@
188188
}
189189
}
190190
}
191+
},
192+
"@kephas/ngx-ace": {
193+
"projectType": "library",
194+
"root": "projects/kephas/ngx-ace",
195+
"sourceRoot": "projects/kephas/ngx-ace/src",
196+
"prefix": "lib",
197+
"architect": {
198+
"build": {
199+
"builder": "@angular-devkit/build-angular:ng-packagr",
200+
"options": {
201+
"project": "projects/kephas/ngx-ace/ng-package.json"
202+
},
203+
"configurations": {
204+
"production": {
205+
"tsConfig": "projects/kephas/ngx-ace/tsconfig.lib.prod.json"
206+
},
207+
"development": {
208+
"tsConfig": "projects/kephas/ngx-ace/tsconfig.lib.json"
209+
}
210+
},
211+
"defaultConfiguration": "production"
212+
},
213+
"test": {
214+
"builder": "@angular-devkit/build-angular:karma",
215+
"options": {
216+
"main": "projects/kephas/ngx-ace/src/test.ts",
217+
"tsConfig": "projects/kephas/ngx-ace/tsconfig.spec.json",
218+
"karmaConfig": "projects/kephas/ngx-ace/karma.conf.js"
219+
}
220+
}
221+
}
191222
}
192223
},
193224
"defaultProject": "@kephas/core"

src/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"pack-commands": "ng build --project=@kephas/commands",
1414
"pack-ui": "ng build --project=@kephas/ui",
1515
"pack-ngx-core": "ng build --project=@kephas/ngx-core",
16+
"pack-ngx-ace": "ng build --project=@kephas/ngx-ace",
1617
"pack-all-fwk": "ng build --project=@kephas/core && ng build --project=@kephas/reflection && ng build --project=@kephas/messaging && ng build --project=@kephas/commands && ng build --project=@kephas/ui",
17-
"pack-all-ngx": "ng build --project=@kephas/ngx-core"
18+
"pack-all-ngx": "ng build --project=@kephas/ngx-core && ng build --project=@kephas/ngx-ace"
1819
},
1920
"private": true,
2021
"dependencies": {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# @kephas/angular-ace
2+
3+
Provides the integration of the Ace editor with Kephas and Angular 12+.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, '../../../coverage/kephas/ngx-ace'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true
43+
});
44+
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../../dist/kephas/ngx-ace",
4+
"lib": {
5+
"entryFile": "src/public-api.ts"
6+
}
7+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "@kephas/ngx-ace",
3+
"version": "1.0.0-preview.1",
4+
"description": "Provides the integration of the Ace editor with Kephas and Angular 12+.",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/kephas-software/kephas-js/tree/master/src/projects/kephas/ngx-ace"
8+
},
9+
"keywords": [
10+
"kephas",
11+
"angular",
12+
"ng",
13+
"ace"
14+
],
15+
"author": {
16+
"name": "Kephas Software SRL"
17+
},
18+
"license": "MIT",
19+
"peerDependencies": {
20+
"@angular/common": "^12.2.0",
21+
"@angular/core": "^12.2.0",
22+
"@kephas/commands": "^1.0.0-preview.1",
23+
"@kephas/core": "^1.0.0-preview.1",
24+
"@kephas/messaging": "^1.0.0-preview.1",
25+
"@kephas/reflection": "^1.0.0-preview.1",
26+
"@kephas/ui": "^1.0.0-preview.1",
27+
"brace": "^0.11.1",
28+
"rxjs": "^6.5.3 || ^7.0.0",
29+
"zone.js": "~0.11.4"
30+
},
31+
"dependencies": {
32+
"tslib": "^2.3.0"
33+
},
34+
"devDependencies": {
35+
"@angular/common": "^12.2.0",
36+
"@angular/core": "^12.2.0",
37+
"@kephas/commands": "^1.0.0-preview.1",
38+
"@kephas/core": "^1.0.0-preview.1",
39+
"@kephas/messaging": "^1.0.0-preview.1",
40+
"@kephas/reflection": "^1.0.0-preview.1",
41+
"@kephas/ui": "^1.0.0-preview.1",
42+
"brace": "^0.11.1",
43+
"rxjs": "^6.5.3 || ^7.0.0",
44+
"typescript": "4.2.4",
45+
"zone.js": "~0.11.4"
46+
}
47+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { NgxAceComponent } from './ngx-ace.component';
4+
5+
describe('NgxAceComponent', () => {
6+
let component: NgxAceComponent;
7+
let fixture: ComponentFixture<NgxAceComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ NgxAceComponent ]
12+
})
13+
.compileComponents();
14+
});
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(NgxAceComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'lib-ngx-ace',
5+
template: `
6+
<p>
7+
ngx-ace works!
8+
</p>
9+
`,
10+
styles: [
11+
]
12+
})
13+
export class NgxAceComponent implements OnInit {
14+
15+
constructor() { }
16+
17+
ngOnInit(): void {
18+
}
19+
20+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { NgModule } from '@angular/core';
2+
import { NgxAceComponent } from './ngx-ace.component';
3+
4+
5+
6+
@NgModule({
7+
declarations: [
8+
NgxAceComponent
9+
],
10+
imports: [
11+
],
12+
exports: [
13+
NgxAceComponent
14+
]
15+
})
16+
export class NgxAceModule { }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { TestBed } from '@angular/core/testing';
2+
3+
import { NgxAceService } from './ngx-ace.service';
4+
5+
describe('NgxAceService', () => {
6+
let service: NgxAceService;
7+
8+
beforeEach(() => {
9+
TestBed.configureTestingModule({});
10+
service = TestBed.inject(NgxAceService);
11+
});
12+
13+
it('should be created', () => {
14+
expect(service).toBeTruthy();
15+
});
16+
});

0 commit comments

Comments
 (0)