Skip to content

Commit ec2da1b

Browse files
authored
Merge pull request #2 from manudss/switrch-to-angular-library
Switrch to angular library : Published as 0.6.3
2 parents 3c13882 + bceb05d commit ec2da1b

Some content is hidden

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

48 files changed

+21457
-79
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://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

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1-
node_modules
2-
/test-api/node_modules/
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
34
/dist
5+
/tmp
6+
/out-tsc
7+
8+
# dependencies
9+
/node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db

.metadata.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0.34.0

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
yarn add v1.12.3
2+
[1/4] Resolving packages...
3+
[2/4] Fetching packages...
4+
info [email protected]: The platform "win32" is incompatible with this module.
5+
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
6+
[3/4] Linking dependencies...
7+
[4/4] Building fresh packages...
8+
success Saved lockfile.
9+
success Saved 53 new dependencies.
10+
info Direct dependencies
11+
├─ @angular-devkit/[email protected]
12+
├─ @angular-devkit/[email protected]
13+
14+
15+
info All dependencies
16+
├─ @angular-devkit/[email protected]
17+
├─ @angular-devkit/[email protected]
18+
├─ @angular-devkit/[email protected]
19+
├─ @angular-devkit/[email protected]
20+
├─ @ngtools/[email protected]
21+
├─ @types/[email protected]
22+
├─ @types/[email protected]
23+
├─ @webassemblyjs/[email protected]
24+
├─ @webassemblyjs/[email protected]
25+
├─ @webassemblyjs/[email protected]
26+
├─ @webassemblyjs/[email protected]
27+
├─ @webassemblyjs/[email protected]
28+
├─ @webassemblyjs/[email protected]
29+
├─ @xtuc/[email protected]
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+
54+
55+
56+
57+
58+
59+
60+
61+
62+
63+
64+
65+
66+
67+
68+
69+
Done in 212.87s.

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,21 @@ Available annotations:
154154
public getPostForUserId(number: number, @QueryParam('userId') userId: number, @ResponseObservable res: Observable<any> = undefined): Observable<any> {
155155
return res.pipe(map((response) => response.slice(0, number)));
156156
}
157-
```
157+
```
158+
159+
160+
### Change logs
161+
162+
0.6.x
163+
-> updates to latest versions of Angular
164+
-> Rename librery to ngx-http-annotations
165+
-> add @ResponseObservable to transform response.
166+
167+
0.6.2 et 0.6.3
168+
-> update to build library with angular, to avoid error when build in --prod
169+
170+
171+
### Source and issues
172+
173+
Code are located in github : https://github.com/manudss/ngx-http-annotations
174+

angular.json

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

e2e/protractor.conf.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Protractor configuration file, see link for more information
2+
// https://github.com/angular/protractor/blob/master/lib/config.ts
3+
4+
const { SpecReporter } = require('jasmine-spec-reporter');
5+
6+
exports.config = {
7+
allScriptsTimeout: 11000,
8+
specs: [
9+
'./src/**/*.e2e-spec.ts'
10+
],
11+
capabilities: {
12+
'browserName': 'chrome'
13+
},
14+
directConnect: true,
15+
baseUrl: 'http://localhost:4200/',
16+
framework: 'jasmine',
17+
jasmineNodeOpts: {
18+
showColors: true,
19+
defaultTimeoutInterval: 30000,
20+
print: function() {}
21+
},
22+
onPrepare() {
23+
require('ts-node').register({
24+
project: require('path').join(__dirname, './tsconfig.e2e.json')
25+
});
26+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27+
}
28+
};

e2e/src/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('workspace-project App', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display welcome message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Welcome to app!');
13+
});
14+
});

e2e/src/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/tsconfig.e2e.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/app",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types": [
8+
"jasmine",
9+
"jasminewd2",
10+
"node"
11+
]
12+
}
13+
}

ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-http-annotations",
3-
"version": "0.5.2",
3+
"version": "0.6.3",
44
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
55
"src": "src",
66
"dest": "dist/ngx-http-annotations",

0 commit comments

Comments
 (0)