Skip to content

Commit a105a4b

Browse files
committed
export issue fixed and updated sample app to use dist index js file
1 parent 479271a commit a105a4b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,4 @@ var ImageKit = function(
281281
}
282282
};
283283

284-
export default ImageKit;
284+
export = ImageKit;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"lint": "./node_modules/eslint/bin/eslint.js tests/ utils/phash.js",
99
"lint:fix": "./node_modules/eslint/bin/eslint.js --fix tests/ utils/phash.js",
10-
"check-types": "tsc",
10+
"compile": "tsc",
1111
"test": "export NODE_ENV=test; nyc ./node_modules/mocha/bin/mocha --exit -t 40000 tests/*.js;ex=$?;unset NODE_ENV; exit $ex;",
1212
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
1313
},

sample/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const ImageKit = require("../index");
1+
const ImageKit = require("../dist/");
22
const fs = require("fs");
33
const path = require("path");
44

55
const CONFIG_OPTIONS = {
6-
publicKey : "public_gpyr8A2ZBDZvUBvyNSeacygiTb0=",
7-
privateKey : "private_X+BMCEhq/Fx+E3TbXadFw7QhwgI=",
8-
urlEndpoint : "https://ik.imagekit.io/0gr1w07bzr6iu/"
6+
publicKey : "your_public_api_key",
7+
privateKey : "your_private_api_key",
8+
urlEndpoint : "https://ik.imagekit.io/your_imagekit_id/"
99
}
1010

1111
const FILE_PATH = path.resolve(__dirname, "./test_image.jpg"), FILE_NAME = "test_image", IMG_URL = "https://images.pexels.com/photos/247676/pexels-photo-247676.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260";

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Basic Options */
66
// "incremental": true, /* Enable incremental compilation */
77
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8-
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
8+
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
99
// "lib": [], /* Specify library files to be included in the compilation. */
1010
// "allowJs": true, /* Allow javascript files to be compiled. */
1111
// "checkJs": true, /* Report errors in .js files. */

0 commit comments

Comments
 (0)