Skip to content

Commit

Permalink
Merge pull request #108 from imagekit-developer/SDK-117
Browse files Browse the repository at this point in the history
Sdk 117
  • Loading branch information
imagekitio authored Apr 29, 2024
2 parents 0b5b567 + 1f1e861 commit 0048fb9
Show file tree
Hide file tree
Showing 30 changed files with 16,077 additions and 12,795 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install -g @angular/cli@1.4.10
npm install -g @angular/cli@12.2.18
cd sdk
npm install
cd tests/test-apps/sample-server
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install -g @angular/cli@1.4.10
npm install -g @angular/cli@12.2.18
cd sdk
npm install
cd tests/test-apps/sample-server
Expand All @@ -49,7 +49,7 @@ jobs:
registry-url: https://registry.npmjs.org/
- name: npm publish
run: |
npm install -g @angular/cli@1.4.10
npm install -g @angular/cli@12.2.18
cd sdk
npm install
npm run build
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Twitter Follow](https://img.shields.io/twitter/follow/imagekitio?label=Follow&style=social)](https://twitter.com/ImagekitIo)

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

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.

Expand Down Expand Up @@ -58,6 +58,12 @@ authenticator = async () => {

*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.

## Version Support
| SDK Version | Angular 11.x | Angular 12.2.x | Angular 13.x | Angular 14.x | Angular 15.x | Angular 16.x | Angular 17.x |
|-------------|---------|---------|---------|---------|---------|---------|---------|
| 5.x || ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |✔️ |
| 4.x | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |||


## Installation

Expand Down
60 changes: 0 additions & 60 deletions sdk/.angular-cli.json

This file was deleted.

121 changes: 121 additions & 0 deletions sdk/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"imagekitio-angular": {
"projectType": "library",
"root": "projects/imagekitio-angular",
"sourceRoot": "projects/imagekitio-angular/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/imagekitio-angular/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/imagekitio-angular/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/imagekitio-angular/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "tests/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tests/tsconfig.spec.json",
"karmaConfig": "karma.conf.js"
}
}
}
},
"app": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "/",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "app:build:production"
},
"development": {
"browserTarget": "app:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "app:build"
}
}
}
}
},
"defaultProject": "imagekitio-angular"
}
43 changes: 27 additions & 16 deletions sdk/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,52 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
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/cli/plugins/karma')
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
angularCli: {
environment: 'dev'
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/imagekitio-angular'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true,
browsers: ['ChromeHeadlessCustom'],
customLaunchers: {
ChromeHeadless: {
base: 'Chrome',
ChromeHeadlessCustom: {
base: 'ChromeHeadless',
flags: [
'--headless',
'--disable-gpu',
'--no-sandbox',
'--remote-debugging-port=9222',
'--disable-gpu',
// Add any other flags you might need here
]
}
},
browsers: ['ChromeHeadless'],
singleRun: true
});
};
17 changes: 0 additions & 17 deletions sdk/lib/package.json

This file was deleted.

9 changes: 0 additions & 9 deletions sdk/lib/src/public_api.ts

This file was deleted.

Loading

0 comments on commit 0048fb9

Please sign in to comment.