Skip to content

Commit 0048fb9

Browse files
authored
Merge pull request #108 from imagekit-developer/SDK-117
Sdk 117
2 parents 0b5b567 + 1f1e861 commit 0048fb9

30 files changed

+16077
-12795
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
node-version: ${{ matrix.node-version }}
2020
- name: npm install, build, and test
2121
run: |
22-
npm install -g @angular/cli@1.4.10
22+
npm install -g @angular/cli@12.2.18
2323
cd sdk
2424
npm install
2525
cd tests/test-apps/sample-server

.github/workflows/npmpublish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
node-version: ${{ matrix.node-version }}
2323
- name: npm install, build, and test
2424
run: |
25-
npm install -g @angular/cli@1.4.10
25+
npm install -g @angular/cli@12.2.18
2626
cd sdk
2727
npm install
2828
cd tests/test-apps/sample-server
@@ -49,7 +49,7 @@ jobs:
4949
registry-url: https://registry.npmjs.org/
5050
- name: npm publish
5151
run: |
52-
npm install -g @angular/cli@1.4.10
52+
npm install -g @angular/cli@12.2.18
5353
cd sdk
5454
npm install
5555
npm run build

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
88
[![Twitter Follow](https://img.shields.io/twitter/follow/imagekitio?label=Follow&style=social)](https://twitter.com/ImagekitIo)
99

10-
ImageKit Angular SDK allows you to resize, optimize, deliver, and upload images and videos in your react application.
10+
ImageKit Angular SDK allows you to resize, optimize, deliver, and upload images and videos in your angular application.
1111

1212
ImageKit is complete media storage, optimization, and transformation solution that comes with an image and video CDN. It can be integrated with your existing infrastructure - storage like AWS S3, web servers, your CDN, and custom domain names, allowing you to deliver optimized images in minutes with minimal code changes.
1313

@@ -58,6 +58,12 @@ authenticator = async () => {
5858

5959
*Note*: Avoid generating security parameters on the client side. Always send a request to your backend to retrieve security parameters, as the generation of these parameters necessitates the use of your Imagekit `privateKey`, which must not be included in client-side code.
6060

61+
## Version Support
62+
| SDK Version | Angular 11.x | Angular 12.2.x | Angular 13.x | Angular 14.x | Angular 15.x | Angular 16.x | Angular 17.x |
63+
|-------------|---------|---------|---------|---------|---------|---------|---------|
64+
| 5.x || ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |✔️ |
65+
| 4.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |||
66+
6167

6268
## Installation
6369

sdk/.angular-cli.json

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

sdk/angular.json

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"imagekitio-angular": {
7+
"projectType": "library",
8+
"root": "projects/imagekitio-angular",
9+
"sourceRoot": "projects/imagekitio-angular/src",
10+
"prefix": "lib",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-angular:ng-packagr",
14+
"options": {
15+
"project": "projects/imagekitio-angular/ng-package.json"
16+
},
17+
"configurations": {
18+
"production": {
19+
"tsConfig": "projects/imagekitio-angular/tsconfig.lib.prod.json"
20+
},
21+
"development": {
22+
"tsConfig": "projects/imagekitio-angular/tsconfig.lib.json"
23+
}
24+
},
25+
"defaultConfiguration": "production"
26+
},
27+
"test": {
28+
"builder": "@angular-devkit/build-angular:karma",
29+
"options": {
30+
"main": "tests/test.ts",
31+
"polyfills": "src/polyfills.ts",
32+
"tsConfig": "tests/tsconfig.spec.json",
33+
"karmaConfig": "karma.conf.js"
34+
}
35+
}
36+
}
37+
},
38+
"app": {
39+
"projectType": "application",
40+
"schematics": {
41+
"@schematics/angular:application": {
42+
"strict": true
43+
}
44+
},
45+
"root": "/",
46+
"sourceRoot": "src",
47+
"prefix": "app",
48+
"architect": {
49+
"build": {
50+
"builder": "@angular-devkit/build-angular:browser",
51+
"options": {
52+
"outputPath": "dist/app",
53+
"index": "src/index.html",
54+
"main": "src/main.ts",
55+
"polyfills": "src/polyfills.ts",
56+
"tsConfig": "src/tsconfig.app.json",
57+
"assets": [
58+
"src/favicon.ico",
59+
"src/assets"
60+
],
61+
"styles": [
62+
"src/styles.css"
63+
],
64+
"scripts": []
65+
},
66+
"configurations": {
67+
"production": {
68+
"budgets": [
69+
{
70+
"type": "initial",
71+
"maximumWarning": "500kb",
72+
"maximumError": "1mb"
73+
},
74+
{
75+
"type": "anyComponentStyle",
76+
"maximumWarning": "2kb",
77+
"maximumError": "4kb"
78+
}
79+
],
80+
"fileReplacements": [
81+
{
82+
"replace": "src/environments/environment.ts",
83+
"with": "src/environments/environment.prod.ts"
84+
}
85+
],
86+
"outputHashing": "all"
87+
},
88+
"development": {
89+
"buildOptimizer": false,
90+
"optimization": false,
91+
"vendorChunk": true,
92+
"extractLicenses": false,
93+
"sourceMap": true,
94+
"namedChunks": true
95+
}
96+
},
97+
"defaultConfiguration": "production"
98+
},
99+
"serve": {
100+
"builder": "@angular-devkit/build-angular:dev-server",
101+
"configurations": {
102+
"production": {
103+
"browserTarget": "app:build:production"
104+
},
105+
"development": {
106+
"browserTarget": "app:build:development"
107+
}
108+
},
109+
"defaultConfiguration": "development"
110+
},
111+
"extract-i18n": {
112+
"builder": "@angular-devkit/build-angular:extract-i18n",
113+
"options": {
114+
"browserTarget": "app:build"
115+
}
116+
}
117+
}
118+
}
119+
},
120+
"defaultProject": "imagekitio-angular"
121+
}

sdk/karma.conf.js

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,52 @@
44
module.exports = function (config) {
55
config.set({
66
basePath: '',
7-
frameworks: ['jasmine', '@angular/cli'],
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
13-
require('@angular/cli/plugins/karma')
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
1414
],
15-
client:{
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+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
19-
reports: [ 'html', 'lcovonly' ],
20-
fixWebpackSourcePaths: true
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
2126
},
22-
angularCli: {
23-
environment: 'dev'
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, '../../coverage/imagekitio-angular'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
2434
},
2535
reporters: ['progress', 'kjhtml'],
2636
port: 9876,
2737
colors: true,
2838
logLevel: config.LOG_INFO,
2939
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true,
43+
browsers: ['ChromeHeadlessCustom'],
3044
customLaunchers: {
31-
ChromeHeadless: {
32-
base: 'Chrome',
45+
ChromeHeadlessCustom: {
46+
base: 'ChromeHeadless',
3347
flags: [
34-
'--headless',
35-
'--disable-gpu',
3648
'--no-sandbox',
37-
'--remote-debugging-port=9222',
49+
'--disable-gpu',
50+
// Add any other flags you might need here
3851
]
3952
}
4053
},
41-
browsers: ['ChromeHeadless'],
42-
singleRun: true
4354
});
4455
};

sdk/lib/package.json

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

sdk/lib/src/public_api.ts

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

0 commit comments

Comments
 (0)