Skip to content

Commit f08cf84

Browse files
committed
chore(ng): migrate to angular cli project
1 parent d91d1b4 commit f08cf84

Some content is hidden

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

70 files changed

+15842
-3986
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

+46-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,46 @@
1-
node_modules
2-
typings
3-
.idea
4-
.vscode
5-
*.log
6-
dist
7-
auto-complete.iml
8-
yarn.lock
9-
package-lock.json
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

.npmignore

-6
This file was deleted.

.travis.yml

-8
This file was deleted.

README.md

+13-33
Original file line numberDiff line numberDiff line change
@@ -104,48 +104,28 @@ You can look at different show cases for it here as [Component](https://rawgit.c
104104

105105
**Observable Source**
106106

107-
* _Example_ http://plnkr.co/edit/ExzNSh?p=preview
107+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.1.
108108

109-
**List Formatter Example**
109+
## Development server
110110

111-
* _Example 1_ http://plnkr.co/edit/F9nrWp?p=preview
112-
* _Example 2 (With custom css)_ http://plnkr.co/edit/0QFYFHMmCAFmhbYAGQl7?p=preview
111+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
113112

114-
## Contributors are welcomed
113+
## Code scaffolding
115114

116-
This module is only improved and maintained by contributors like you;
115+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
117116

118-
As a contributor, it's NOT required to be skilled in Javascript nor Angular.
119-
You can contribute to the following;
117+
## Build
120118

121-
* Updating README.md
122-
* Making more and clearer comments
123-
* Answering issues and building FAQ
124-
* Documentation
125-
* Translation
119+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
126120

127-
In result of your active contribution, you will be listed as a core contributor
128-
on https://ng2-ui.github.io, and a member of ng2-ui too.
121+
## Running unit tests
129122

130-
If you are interested in becoming a contributor and/or a member of ng-ui,
131-
please send me email to `allenhwkim AT gmail.com` with your github id.
123+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
132124

133-
## For Developers
125+
## Running end-to-end tests
134126

135-
### To start
127+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
136128

137-
$ git clone https://github.com/ng2-ui/auto-complete.git
138-
$ cd auto-complete
139-
$ npm install
140-
$ npm start
129+
## Further help
141130

142-
### List of available npm tasks
143-
144-
* `npm run` : List all available tasks
145-
* `npm start`: Run `app` directory for development using `webpack-dev-server` with port 9001
146-
* `npm run clean`: Remove dist folder
147-
* `npm run lint`: Lint TypeScript code
148-
* `npm run build:ngc`: build ES module
149-
* `npm run build:umd`: Build UMD module `ng2-map.umd.js`
150-
* `npm run build:app`: Build `app/build/app.js` for runnable examples
151-
* `npm run build`: Build all(clean, build:ngc, build:umc, and build:app)
131+
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).

angular.json

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"auto-complete": {
7+
"projectType": "library",
8+
"root": "projects/auto-complete",
9+
"sourceRoot": "projects/auto-complete/src",
10+
"prefix": "ngui",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-ng-packagr:build",
14+
"options": {
15+
"tsConfig": "projects/auto-complete/tsconfig.lib.json",
16+
"project": "projects/auto-complete/ng-package.json"
17+
},
18+
"configurations": {
19+
"production": {
20+
"tsConfig": "projects/auto-complete/tsconfig.lib.prod.json"
21+
}
22+
}
23+
},
24+
"test": {
25+
"builder": "@angular-devkit/build-angular:karma",
26+
"options": {
27+
"main": "projects/auto-complete/src/test.ts",
28+
"tsConfig": "projects/auto-complete/tsconfig.spec.json",
29+
"karmaConfig": "projects/auto-complete/karma.conf.js"
30+
}
31+
},
32+
"lint": {
33+
"builder": "@angular-devkit/build-angular:tslint",
34+
"options": {
35+
"tsConfig": [
36+
"projects/auto-complete/tsconfig.lib.json",
37+
"projects/auto-complete/tsconfig.spec.json"
38+
],
39+
"exclude": [
40+
"**/node_modules/**"
41+
]
42+
}
43+
}
44+
}
45+
},
46+
"demo": {
47+
"projectType": "application",
48+
"schematics": {
49+
"@schematics/angular:component": {
50+
"style": "scss"
51+
}
52+
},
53+
"root": "projects/demo",
54+
"sourceRoot": "projects/demo/src",
55+
"prefix": "app",
56+
"architect": {
57+
"build": {
58+
"builder": "@angular-devkit/build-angular:browser",
59+
"options": {
60+
"outputPath": "dist/demo",
61+
"index": "projects/demo/src/index.html",
62+
"main": "projects/demo/src/main.ts",
63+
"polyfills": "projects/demo/src/polyfills.ts",
64+
"tsConfig": "projects/demo/tsconfig.app.json",
65+
"aot": true,
66+
"assets": [
67+
"projects/demo/src/favicon.ico",
68+
"projects/demo/src/assets"
69+
],
70+
"styles": [
71+
"projects/demo/src/styles.scss"
72+
],
73+
"scripts": []
74+
},
75+
"configurations": {
76+
"production": {
77+
"fileReplacements": [
78+
{
79+
"replace": "projects/demo/src/environments/environment.ts",
80+
"with": "projects/demo/src/environments/environment.prod.ts"
81+
}
82+
],
83+
"optimization": true,
84+
"outputHashing": "all",
85+
"sourceMap": false,
86+
"extractCss": true,
87+
"namedChunks": false,
88+
"extractLicenses": true,
89+
"vendorChunk": false,
90+
"buildOptimizer": true,
91+
"budgets": [
92+
{
93+
"type": "initial",
94+
"maximumWarning": "2mb",
95+
"maximumError": "5mb"
96+
},
97+
{
98+
"type": "anyComponentStyle",
99+
"maximumWarning": "6kb",
100+
"maximumError": "10kb"
101+
}
102+
]
103+
}
104+
}
105+
},
106+
"serve": {
107+
"builder": "@angular-devkit/build-angular:dev-server",
108+
"options": {
109+
"browserTarget": "demo:build"
110+
},
111+
"configurations": {
112+
"production": {
113+
"browserTarget": "demo:build:production"
114+
}
115+
}
116+
},
117+
"extract-i18n": {
118+
"builder": "@angular-devkit/build-angular:extract-i18n",
119+
"options": {
120+
"browserTarget": "demo:build"
121+
}
122+
},
123+
"test": {
124+
"builder": "@angular-devkit/build-angular:karma",
125+
"options": {
126+
"main": "projects/demo/src/test.ts",
127+
"polyfills": "projects/demo/src/polyfills.ts",
128+
"tsConfig": "projects/demo/tsconfig.spec.json",
129+
"karmaConfig": "projects/demo/karma.conf.js",
130+
"assets": [
131+
"projects/demo/src/favicon.ico",
132+
"projects/demo/src/assets"
133+
],
134+
"styles": [
135+
"projects/demo/src/styles.scss"
136+
],
137+
"scripts": []
138+
}
139+
},
140+
"lint": {
141+
"builder": "@angular-devkit/build-angular:tslint",
142+
"options": {
143+
"tsConfig": [
144+
"projects/demo/tsconfig.app.json",
145+
"projects/demo/tsconfig.spec.json",
146+
"projects/demo/e2e/tsconfig.json"
147+
],
148+
"exclude": [
149+
"**/node_modules/**"
150+
]
151+
}
152+
},
153+
"e2e": {
154+
"builder": "@angular-devkit/build-angular:protractor",
155+
"options": {
156+
"protractorConfig": "projects/demo/e2e/protractor.conf.js",
157+
"devServerTarget": "demo:serve"
158+
},
159+
"configurations": {
160+
"production": {
161+
"devServerTarget": "demo:serve:production"
162+
}
163+
}
164+
}
165+
}
166+
}},
167+
"defaultProject": "auto-complete"
168+
}

app/app.component.ts

-11
This file was deleted.

app/app.route.ts

-17
This file was deleted.

app/app.service.ts

-24
This file was deleted.

0 commit comments

Comments
 (0)