Skip to content

Commit a711a57

Browse files
author
Jagveer
committed
In progress
1 parent 3f4c24c commit a711a57

File tree

3 files changed

+615
-46
lines changed

3 files changed

+615
-46
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
"url-polyfill": "^1.1.7"
99
},
1010
"devDependencies": {
11+
"chai": "^4.2.0",
1112
"grunt": "^1.0.4",
12-
"grunt-browserify": "^5.3.0"
13+
"grunt-browserify": "^5.3.0",
14+
"mocha": "^7.0.1",
15+
"sinon": "^8.1.1"
1316
},
1417
"scripts": {
1518
"test": "echo \"Error: no test specified\" && exit 1"
@@ -37,4 +40,4 @@
3740
"url": "https://github.com/imagekit-developer/imagekit-javascript/issues"
3841
},
3942
"homepage": "https://github.com/imagekit-developer/imagekit-javascript#readme"
40-
}
43+
}

samples/sample-app/views/index.pug

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ html
1313
h4 Original Image
1414
p
1515
img(src="")
16-
div(id='trans_image')
16+
div(id='transgit_image')
1717
h4 Sample transformation with height: 300, width: 400:
1818
p
1919
img(src="")
@@ -57,32 +57,11 @@ html
5757

5858
var el = document.getElementById('images')
5959
el.setAttribute("style", "");
60-
61-
//- var el = getImageURLElement(imagekit.url({
62-
//- src: srcUrl,
63-
//- transformation : sampleTransformations
64-
//- }));
65-
//- statusEl.appendChild(el);
66-
//- console.log(imagekit.url({
67-
//- src: result.url,
68-
//- transformation : [{ HEIGHT: 300, WIDTH: 400}]
69-
//- }));
7060
}
7161

7262

7363
});
7464
}
75-
76-
function getImageURLElement (url) {
77-
anchorElement = document.createElement('a');
78-
anchorElement.innerHTML = url;
79-
anchorElement.setAttribute("target", "_blank")
80-
anchorElement.setAttribute("href", url);
81-
divElement = document.createElement("div");
82-
divElement.innerHTML = "You can access the image with sample transformation at: "
83-
divElement.appendChild(anchorElement);
84-
return divElement;
85-
}
8665
} catch(ex) {
8766
console.log(ex);
8867
}

0 commit comments

Comments
 (0)