modal init

This commit is contained in:
Yubing325 2020-06-09 11:57:54 -05:00
parent 46fb56b0ca
commit 5bd9ae4d3b
16 changed files with 239 additions and 4 deletions

View File

@ -163,6 +163,46 @@
}
}
}
},
"@poweredsoft/ngx-bootstrap": {
"projectType": "library",
"root": "projects/poweredsoft/ngx-bootstrap",
"sourceRoot": "projects/poweredsoft/ngx-bootstrap/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/poweredsoft/ngx-bootstrap/tsconfig.lib.json",
"project": "projects/poweredsoft/ngx-bootstrap/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/poweredsoft/ngx-bootstrap/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/poweredsoft/ngx-bootstrap/src/test.ts",
"tsConfig": "projects/poweredsoft/ngx-bootstrap/tsconfig.spec.json",
"karmaConfig": "projects/poweredsoft/ngx-bootstrap/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/poweredsoft/ngx-bootstrap/tsconfig.lib.json",
"projects/poweredsoft/ngx-bootstrap/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}},
"defaultProject": "ngx-cdk-ui"
}

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "ngx-cdk-ui",
"version": "0.0.0",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,5 +1,5 @@
{
"name": "ngx-cdk-ui",
"name": "ngx-ui",
"version": "0.0.0",
"scripts": {
"ng": "ng",
@ -9,8 +9,8 @@
"lint": "ng lint",
"e2e": "ng e2e",
"clean": "rimraf dist",
"start:app": "wait-on dist/poweredsoft/ngx-cdk-ui/fesm5 && ng serve --poll 2000",
"watch:lib": "ng build @poweredsoft/ngx-cdk-ui --watch",
"start:app": "wait-on dist/poweredsoft/ngx-cdk-ui/fesm5 && dist/poweredsoft/ngx-bootstrap/fesm5 && ng serve --poll 2000",
"watch:lib": "ng build @poweredsoft/ngx-cdk-ui --watch && ng build @poweredsoft/ngx-bootstrap --watch",
"watch:all": "npm run clean && run-p watch:lib start:app"
},
"private": true,

View File

@ -0,0 +1,24 @@
# NgxBootstrap
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.9.
## Code scaffolding
Run `ng generate component component-name --project ngx-bootstrap` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-bootstrap`.
> Note: Don't forget to add `--project ngx-bootstrap` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build ngx-bootstrap` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build ngx-bootstrap`, go to the dist folder `cd dist/ngx-bootstrap` and run `npm publish`.
## Running unit tests
Run `ng test ngx-bootstrap` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../../coverage/poweredsoft/ngx-bootstrap'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/poweredsoft/ngx-bootstrap",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@ -0,0 +1,12 @@
{
"name": "@poweredsoft/ngx-bootstrap",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^9.1.9",
"@angular/core": "^9.1.9",
"@poweredsoft/ngx-cdk-ui": "0.0.1"
},
"dependencies": {
"tslib": "^1.10.0"
}
}

View File

@ -0,0 +1,11 @@
import { NgModule } from '@angular/core';
@NgModule({
declarations: [],
imports: [
],
exports: []
})
export class NgxBootstrapModule { }

View File

@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class NgxBootstrapService {
constructor() { }
}

View File

@ -0,0 +1,7 @@
/*
* Public API Surface of ngx-bootstrap
*/
export * from './lib/ngx-bootstrap.service';
export * from './lib/ngx-bootstrap.component';
export * from './lib/ngx-bootstrap.module';

View File

@ -0,0 +1,26 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -0,0 +1,23 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.lib.json",
"angularCompilerOptions": {
"enableIvy": false
}
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}

View File

@ -19,6 +19,10 @@
"@poweredsoft/ngx-cdk-ui": [
"dist/poweredsoft/ngx-cdk-ui/poweredsoft-ngx-cdk-ui",
"dist/poweredsoft/ngx-cdk-ui"
],
"@poweredsoft/ngx-bootstrap": [
"dist/poweredsoft/ngx-bootstrap/poweredsoft-ngx-bootstrap",
"dist/poweredsoft/ngx-bootstrap"
]
}
},