Skip to content

Commit 0d196e9

Browse files
committed
feat(structure): update project structure and angular to version 8
1 parent e8cfd62 commit 0d196e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+9409
-7955
lines changed

.codeclimate.yml

-27
This file was deleted.

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Editor configuration, see http://editorconfig.org
1+
# Editor configuration, see https://editorconfig.org
22
root = true
33

44
[*]

.gitignore

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22

33
# compiled output
44
/dist
5-
dist.*
65
/tmp
76
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
89

910
# dependencies
1011
/node_modules
1112

13+
# profiling files
14+
chrome-profiler-events.json
15+
speed-measure-plugin.json
16+
1217
# IDEs and editors
1318
/.idea
1419
.project
@@ -24,22 +29,17 @@ dist.*
2429
!.vscode/tasks.json
2530
!.vscode/launch.json
2631
!.vscode/extensions.json
32+
.history/*
2733

2834
# misc
2935
/.sass-cache
3036
/connect.lock
3137
/coverage
3238
/libpeerconnection.log
3339
npm-debug.log
40+
yarn-error.log
3441
testem.log
3542
/typings
36-
.ng_pkg_build
37-
.ng_build
38-
credentials.json
39-
40-
# e2e
41-
/e2e/*.js
42-
/e2e/*.map
4343

4444
# System Files
4545
.DS_Store

.releaserc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
["@semantic-release/npm", {
6+
"pkgRoot": "dist/library"
7+
}],
8+
["@semantic-release/git", {
9+
"assets": ["package.json", "npm-shrinkwrap.json"]
10+
}]
11+
]
12+
}

.travis.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
language: node_js
2+
addons:
3+
chrome: stable
4+
cache:
5+
directories:
6+
- ~/.npm
7+
notifications:
8+
email: false
9+
node_js:
10+
- '12'
11+
script:
12+
- npm run test:ci && gulp build
13+
after_success:
14+
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run semantic-release; fi
15+
branches:
16+
except:
17+
- /^v\d+\.\d+\.\d+$/

README.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1-
# Angular 7+ Date Picker Widget Library
1+
# Angular 8+ Date Picker Library
22

3-
To build the library run `npm run packagr`
3+
[![Travis](https://travis-ci.org/acaprojects/ngx-date-picker.svg)](https://travis-ci.org/acaprojects/ngx-date-picker)
4+
[![npm version](https://badge.fury.io/js/%40acaprojects%2Fngx-date-picker.svg)](https://badge.fury.io/js/%40acaprojects%2Fngx-date-picker)
5+
[![david-dm](https://david-dm.org/acaprojects/ngx-date-picker.svg)](https://david-dm.org/acaprojects/ngx-date-picker)
6+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
7+
8+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.0.
9+
10+
## Development server
11+
12+
Run `gulp serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
13+
14+
## Build
15+
16+
Run `gulp build` to build the library. The build artifacts will be stored in the `dist/library` directory. Use the `--prod` flag for a production build.
17+
18+
## Running unit tests
19+
20+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
421

522
## Installation
623

7-
You install the library from npm using `npm install @acaprojects/ngx-date-picker`
24+
You install the library from npm using `npm install @acaprojects/ngx-date-picker`;

angular.json

+90-76
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,101 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"ngx-widgets": {
7-
"root": "",
8-
"sourceRoot": "src",
6+
"library": {
7+
"projectType": "library",
8+
"root": "projects/library",
9+
"sourceRoot": "projects/library/src",
10+
"prefix": "lib",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-ng-packagr:build",
14+
"options": {
15+
"tsConfig": "projects/library/tsconfig.lib.json",
16+
"project": "projects/library/ng-package.json"
17+
}
18+
},
19+
"test": {
20+
"builder": "@angular-devkit/build-angular:karma",
21+
"options": {
22+
"main": "projects/library/src/test.ts",
23+
"tsConfig": "projects/library/tsconfig.spec.json",
24+
"karmaConfig": "projects/library/karma.conf.js"
25+
}
26+
},
27+
"lint": {
28+
"builder": "@angular-devkit/build-angular:tslint",
29+
"options": {
30+
"tsConfig": [
31+
"projects/library/tsconfig.lib.json",
32+
"projects/library/tsconfig.spec.json"
33+
],
34+
"exclude": [
35+
"**/node_modules/**"
36+
]
37+
}
38+
}
39+
}
40+
},
41+
"demo": {
942
"projectType": "application",
43+
"schematics": {
44+
"@schematics/angular:class": {
45+
"skipTests": true
46+
},
47+
"@schematics/angular:component": {
48+
"skipTests": true
49+
},
50+
"@schematics/angular:directive": {
51+
"skipTests": true
52+
},
53+
"@schematics/angular:guard": {
54+
"skipTests": true
55+
},
56+
"@schematics/angular:module": {
57+
"skipTests": true
58+
},
59+
"@schematics/angular:pipe": {
60+
"skipTests": true
61+
},
62+
"@schematics/angular:service": {
63+
"skipTests": true
64+
}
65+
},
66+
"root": "projects/demo",
67+
"sourceRoot": "projects/demo/src",
68+
"prefix": "app",
1069
"architect": {
1170
"build": {
1271
"builder": "@angular-devkit/build-angular:browser",
1372
"options": {
14-
"outputPath": "dist",
15-
"index": "src/index.html",
16-
"main": "src/main.ts",
17-
"tsConfig": "src/tsconfig.app.json",
18-
"polyfills": "src/polyfills.ts",
73+
"outputPath": "dist/demo",
74+
"index": "projects/demo/src/index.html",
75+
"main": "projects/demo/src/main.ts",
76+
"polyfills": "projects/demo/src/polyfills.ts",
77+
"tsConfig": "projects/demo/tsconfig.app.json",
78+
"assets": [
79+
"projects/demo/src/favicon.ico",
80+
"projects/demo/src/assets"
81+
],
1982
"stylePreprocessorOptions": {
2083
"includePaths": [
21-
"src/app/shared",
84+
"projects/demo/src",
2285
"node_modules"
2386
]
2487
},
25-
"assets": [
26-
"src/assets",
27-
"src/favicon.ico"
28-
],
2988
"styles": [
30-
"src/styles.css"
89+
"projects/demo/src/styles.css"
3190
],
3291
"scripts": []
3392
},
3493
"configurations": {
3594
"production": {
95+
"fileReplacements": [
96+
{
97+
"replace": "projects/demo/src/environments/environment.ts",
98+
"with": "projects/demo/src/environments/environment.prod.ts"
99+
}
100+
],
36101
"optimization": true,
37102
"outputHashing": "all",
38103
"sourceMap": false,
@@ -42,10 +107,11 @@
42107
"extractLicenses": true,
43108
"vendorChunk": false,
44109
"buildOptimizer": true,
45-
"fileReplacements": [
110+
"budgets": [
46111
{
47-
"replace": "src/environments/environment.ts",
48-
"with": "src/environments/environment.prod.ts"
112+
"type": "initial",
113+
"maximumWarning": "2mb",
114+
"maximumError": "5mb"
49115
}
50116
]
51117
}
@@ -54,85 +120,33 @@
54120
"serve": {
55121
"builder": "@angular-devkit/build-angular:dev-server",
56122
"options": {
57-
"browserTarget": "ngx-widgets:build"
123+
"browserTarget": "demo:build"
58124
},
59125
"configurations": {
60126
"production": {
61-
"browserTarget": "ngx-widgets:build:production"
127+
"browserTarget": "demo:build:production"
62128
}
63129
}
64130
},
65131
"extract-i18n": {
66132
"builder": "@angular-devkit/build-angular:extract-i18n",
67133
"options": {
68-
"browserTarget": "ngx-widgets:build"
69-
}
70-
},
71-
"test": {
72-
"builder": "@angular-devkit/build-angular:karma",
73-
"options": {
74-
"main": "src/test.ts",
75-
"karmaConfig": "./karma.conf.js",
76-
"polyfills": "src/polyfills.ts",
77-
"tsConfig": "src/tsconfig.spec.json",
78-
"scripts": [],
79-
"styles": [
80-
"src/styles.css"
81-
],
82-
"assets": [
83-
"src/assets",
84-
"src/favicon.ico"
85-
]
134+
"browserTarget": "demo:build"
86135
}
87136
},
88137
"lint": {
89138
"builder": "@angular-devkit/build-angular:tslint",
90139
"options": {
91140
"tsConfig": [
92-
"src/tsconfig.app.json",
93-
"src/tsconfig.spec.json"
141+
"projects/demo/tsconfig.app.json",
142+
"projects/demo/tsconfig.spec.json"
94143
],
95144
"exclude": [
96145
"**/node_modules/**"
97146
]
98147
}
99148
}
100149
}
101-
},
102-
"ngx-widgets-e2e": {
103-
"root": "",
104-
"sourceRoot": "",
105-
"projectType": "application",
106-
"architect": {
107-
"e2e": {
108-
"builder": "@angular-devkit/build-angular:protractor",
109-
"options": {
110-
"protractorConfig": "./protractor.conf.js",
111-
"devServerTarget": "ngx-widgets:serve"
112-
}
113-
},
114-
"lint": {
115-
"builder": "@angular-devkit/build-angular:tslint",
116-
"options": {
117-
"tsConfig": [
118-
"e2e/tsconfig.e2e.json"
119-
],
120-
"exclude": [
121-
"**/node_modules/**"
122-
]
123-
}
124-
}
125-
}
126-
}
127-
},
128-
"defaultProject": "ngx-widgets",
129-
"schematics": {
130-
"@schematics/angular:component": {
131-
"prefix": "app",
132-
"styleext": "css"
133-
},
134-
"@schematics/angular:directive": {
135-
"prefix": "app"
136-
}
137-
}
150+
}},
151+
"defaultProject": "library"
138152
}

0 commit comments

Comments
 (0)