Skip to content

Commit 22415b1

Browse files
authored
Merge pull request #15 from imagekit-developer/naming-convention
Naming convention
2 parents b961c67 + 68087a4 commit 22415b1

24 files changed

+14688
-29474
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
node_modules
23
.vscode/settings.json
34
.vscode/launch.json

DEVELOPMENT.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
## Building package
22

3-
Execute following command from the root folder to build the library. This creates a package in `dist` folder.
3+
Execute the following command from the root folder to build the library. This creates a package in the `dist` folder.
44
```sh
5-
npm install # for first time
6-
npm run build
5+
yarn install # for first-time
6+
yarn build
77
```
88

99
## Running test cases
1010

11-
The designated directory for tests is `/tests` folder. All tests will be run against the assertion present in the `/tests/__snapshot__` folder. To create this file you need to just run below command just once. Any update in the tests can be updated to by pressing `u` while the test environment is running.
11+
The designated directory for tests is `/tests` folder. All tests will be run against the assertion present in the `/tests/__snapshot__` folder. To create this file, you need to just run the below command just once. Any update in the tests can be updated to by pressing `u` while the test environment is running.
1212

13-
Execute following command from the root folder to start testing.
13+
Execute the following command from the root folder to start testing.
1414
```sh
15-
npm run test:dev
15+
yarn test:dev
1616
```
1717

1818
## Running sample frontend Vue app

README.md

Lines changed: 366 additions & 100 deletions
Large diffs are not rendered by default.

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
presets: [
3-
'@vue/cli-plugin-babel/preset'
3+
"@babel/env"
44
],
55
env: {
66
"test": {

package-lock.json

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

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "imagekitio-vue",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"scripts": {
55
"build:lib": "./node_modules/.bin/vue-cli-service build --target lib src/index.js",
66
"build": "./node_modules/.bin/vue-cli-service lint --fix; npm run build:lib",
@@ -21,11 +21,7 @@
2121
"url": "https://github.com/imagekit-developer/imagekit-vuejs"
2222
},
2323
"dependencies": {
24-
"babel-plugin-require-context-hook": "^1.0.0",
25-
"core-js": "^3.4.3",
26-
"imagekit-javascript": "^1.2.0",
27-
"jest-vue-preprocessor": "^1.7.0",
28-
"vue": "^2.6.11"
24+
"imagekit-javascript": "^1.3.3"
2925
},
3026
"devDependencies": {
3127
"@babel/core": "^7.7.7",
@@ -65,8 +61,12 @@
6561
"parser": "babel-eslint"
6662
}
6763
},
64+
"license": "MIT",
6865
"browserslist": [
6966
"> 1%",
7067
"last 2 versions"
71-
]
68+
],
69+
"peerDependencies": {
70+
"vue": "^2.6.12"
71+
}
7272
}

samples/sample-app/README.md

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,21 @@
1-
## Installation
2-
3-
Run the following commands from your shell.
4-
5-
### Getting the SDK ready
6-
7-
We will first go to the root,
8-
9-
```bash
10-
cd ../../
11-
```
12-
13-
Install the node modules,
14-
```bash
15-
npm install
16-
```
17-
18-
Create the dist:
19-
20-
```bash
21-
npm run build
22-
```
23-
24-
### Installing the sample-app
25-
26-
Now, Go to `sample-app` by,
27-
```bash
28-
cd samples/sample-app
29-
```
30-
31-
then,
32-
```bash
33-
npm install
34-
```
35-
36-
## Setting the environment variable
37-
Create a .env file by renaming the sample.env in examples/sample-app
1+
## Starting the frontend app
2+
Create a .env file by renaming the sample.env in examples/sample-app. Fill in the required parameters according to your imagekit account.
383

39-
Fill is the required parameters according to your imagekit account.
4+
Inside samples/sample-app, run
405

41-
## Starting the frontend app
42-
Finally run the app,
436
```bash
44-
npm run serve
7+
yarn install
8+
yarn serve
459
```
4610

4711
Open http://localhost:8080/ in the browser.
4812

49-
To run the upload component you also will have set up a server
50-
51-
## Setting up the server
52-
There is a sample server present in the sample app directory in server directory.
53-
It takes the `private key` from .env file, so create a .env file by renaming the sample.env in `samples/sample-app/server`
13+
To use the upload component, you also will have to implement authenticationEndpoint as required during SDK initialization. This sample app has an example backend implementation.
5414

55-
To run this server, go to server directory `cd server`, then run
15+
## Setting up the backend server
16+
Create a .env file by renaming the sample.env in `samples/sample-app/server` and set the `PRIVATE_KEY`. Then run
5617

5718
```bash
58-
npm install
59-
npm run server
60-
```
19+
yarn install
20+
node server.js
21+
```

0 commit comments

Comments
 (0)