diff --git a/README.md b/README.md
index 84ca6ca..89bf6d9 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# CAJAX (*ClassedAjax*) Prajax (*PromiseAjax*) 1.1.7
+# CAJAX (*ClassedAjax*) Prajax (*PromiseAjax*) 2.0.0
CajaxJS is an lightweight JS Http client for everyone!
#### NPM
@@ -8,16 +8,16 @@ npm install cajaxjs
### CDN
```
-
+
-
+
```
## CDN (module)
test.js
```javascript
-import Cajax from 'https://js.gjni.eu/cajax/src/Cajax.js'
-// or import { Cajax } from 'https://js.gjni.eu/cajax/index.js'
+import Cajax from 'https://cdn.jsdelivr.net/npm/cajaxjs@2.0.0/src/Cajax.js'
+// or import { Cajax } from 'https://cdn.jsdelivr.net/npm/cajaxjs@2.0.0/index.js'
Cajax.get("/").send()
// note that you have to use the script tag with type="module"
diff --git a/egg.json b/egg.json
index a2a871a..c970825 100644
--- a/egg.json
+++ b/egg.json
@@ -1,16 +1,15 @@
{
"name": "cajax",
"description": "Cajax/Prajax is an lightweight JS Http client for everyone!",
- "version": "1.1.6",
+ "version": "2.0.0",
"bump": "patch",
- "entry": "/index.js",
+ "entry": "index.js",
"unstable": false,
"unlisted": false,
"repository": "https://github.com/interaapps/cajax",
"files": [
"./src/**/*",
- "./index.js",
- "index.js"
+ "./index.js"
],
"ignore": [
".git"
diff --git a/package.json b/package.json
index a014aac..7585f89 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cajaxjs",
- "version": "1.1.7",
+ "version": "2.0.0",
"description": "CajaxJS is an lightweight JS Http client for everyone! (Promise support) ",
"main": "index.js",
"scripts": {
diff --git a/src/Cajax.d.ts b/src/Cajax.d.ts
deleted file mode 100644
index 8e205b4..0000000
--- a/src/Cajax.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export default Cajax;
-declare class Cajax {
- static post(url: any, data?: {}, options?: {}): CajaxRequest;
- static get(url: any, data?: {}, options?: {}): CajaxRequest;
- static put(url: any, data?: {}, options?: {}): CajaxRequest;
- static delete(url: any, data?: {}, options?: {}): CajaxRequest;
- static trace(url: any, data?: {}, options?: {}): CajaxRequest;
- static connect(url: any, data?: {}, options?: {}): CajaxRequest;
- static options(url: any, data?: {}, options?: {}): CajaxRequest;
- static update(url: any, data?: {}, options?: {}): CajaxRequest;
- static ajax(json: any): CajaxRequest;
-}
-import CajaxRequest from "./CajaxRequest.js";
diff --git a/src/CajaxRequest.d.ts b/src/CajaxRequest.d.ts
deleted file mode 100644
index 8951cc1..0000000
--- a/src/CajaxRequest.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-export default CajaxRequest;
-declare class CajaxRequest {
- constructor(url: any, method: any, data?: any, options?: {});
- onResponseFunction: () => void;
- catchFunction: () => void;
- thenFunction: () => void;
- params: any;
- method: any;
- url: any;
- fetch: Promise;
- options: {};
- data: string | FormData;
- contenttype: string;
- xhr: XMLHttpRequest;
- response(func: any): CajaxRequest;
- then(func: any): CajaxRequest;
- progress(func: any): CajaxRequest;
- catch(func: any): CajaxRequest;
- custom(func: any): CajaxRequest;
- contentType(type: any): CajaxRequest;
- send(): CajaxRequest;
-}
-declare namespace CajaxRequest {
- const useFetch: boolean;
-}
diff --git a/src/CajaxResponse.d.ts b/src/CajaxResponse.d.ts
deleted file mode 100644
index 6e2dc1b..0000000
--- a/src/CajaxResponse.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export default interface CajaxResponse {
- resType: string;
- response: string;
- responseText: string;
- ok: Boolean;
- status: Number;
- statusText: string;
- url: string;
- res: any;
- json(): object;
-}
diff --git a/src/Prajax.d.ts b/src/Prajax.d.ts
deleted file mode 100644
index 7035510..0000000
--- a/src/Prajax.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export default class Prajax {
- static post(url: any, data?: {}, options?: {}): any;
- static get(url: any, data?: {}, options?: {}): any;
- static put(url: any, data?: {}, options?: {}): any;
- static delete(url: any, data?: {}, options?: {}): any;
- static trace(url: any, data?: {}, options?: {}): any;
- static connect(url: any, data?: {}, options?: {}): any;
- static options(url: any, data?: {}, options?: {}): any;
- static update(url: any, data?: {}, options?: {}): any;
- static ajax(json: any): any;
-}
diff --git a/src/PrajaxClient.d.ts b/src/PrajaxClient.d.ts
deleted file mode 100644
index c5a126f..0000000
--- a/src/PrajaxClient.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export default PrajaxClient;
-declare class PrajaxClient {
- constructor(options: any);
- baseUrl: any;
- options(url: any, data?: {}, options?: {}): any;
- data: any;
- get(url: any, data?: {}, options?: {}): any;
- post(url: any, data?: {}, options?: {}): any;
- put(url: any, data?: {}, options?: {}): any;
- delete(url: any, data?: {}, options?: {}): any;
- trace(url: any, data?: {}, options?: {}): any;
- connect(url: any, data?: {}, options?: {}): any;
- update(url: any, data?: {}, options?: {}): any;
- ajax(json: any): any;
-}
diff --git a/src/PrajaxPromise.d.ts b/src/PrajaxPromise.d.ts
deleted file mode 100644
index 71ec2c6..0000000
--- a/src/PrajaxPromise.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export default PrajaxPromise;
-declare function PrajaxPromise(url: any, method: any, data?: any, options?: {}): any;