Skip to content

Commit 1365e13

Browse files
committed
Update examples to depend on published npm module
1 parent 1f4f4ed commit 1365e13

File tree

12 files changed

+18
-174
lines changed

12 files changed

+18
-174
lines changed

examples/node/basic_js_node_14_up/README.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,14 @@
22

33
## Usage
44

5-
1. Build module
6-
7-
```bash
8-
cd ../../../ # Navigate to the root folder
9-
deno task npm
10-
```
11-
12-
2. Setup environment variables
5+
1. Setup environment variables
136

147
- Duplicate `.env.example` and name it `.env`.
158
- Replace `YOUR_API_KEY` with your SerpApi API key.
169

17-
3. Install dependencies and run example
10+
2. Install dependencies and run example
1811

1912
```bash
20-
cd examples/node/basic_js_node_14_up
2113
npm i
2214
npm start
2315
```
24-
25-
## Notes
26-
27-
- If you want to run the example without building the module, you can update
28-
`package.json` to depend on the published `serpapi` npm module instead:
29-
```json
30-
{
31-
"type": "module",
32-
"dependencies": {
33-
"dotenv": "*",
34-
"serpapi": "*" // Relies on the npm module
35-
},
36-
"scripts": {
37-
"start": "node example.js"
38-
}
39-
}
40-
```

examples/node/basic_js_node_14_up/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"dependencies": {
44
"dotenv": "*",
5-
"serpapi": "../../../npm"
5+
"serpapi": "*"
66
},
77
"scripts": {
88
"start": "node example.js"

examples/node/basic_js_node_7_up/README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,14 @@
22

33
## Usage
44

5-
1. Build module
6-
7-
```bash
8-
cd ../../../ # Navigate to the root folder
9-
deno task npm
10-
```
11-
12-
2. Setup environment variables
5+
1. Setup environment variables
136

147
- Duplicate `.env.example` and name it `.env`.
158
- Replace `YOUR_API_KEY` with your SerpApi API key.
169

17-
3. Install dependencies and run example
10+
2. Install dependencies and run example
1811

1912
```bash
20-
cd examples/node/basic_js_node_7_up
2113
npm i
2214
npm start
2315
```
24-
25-
## Notes
26-
27-
- If you want to run the example without building the module, you can update
28-
`package.json` to depend on the published `serpapi` npm module instead:
29-
```json
30-
{
31-
"dependencies": {
32-
"dotenv": "*",
33-
"serpapi": "*" // Relies on the npm module
34-
},
35-
"scripts": {
36-
"start": "node example.js"
37-
}
38-
}
39-
```

examples/node/basic_js_node_7_up/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"dotenv": "*",
4-
"serpapi": "../../../npm"
4+
"serpapi": "*"
55
},
66
"scripts": {
77
"start": "node example.js"

examples/node/basic_ts_node_14_up/README.md

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,14 @@
22

33
## Usage
44

5-
1. Build module
6-
7-
```bash
8-
cd ../../../ # Navigate to the root folder
9-
deno task npm
10-
```
11-
12-
2. Setup environment variables
5+
1. Setup environment variables
136

147
- Duplicate `.env.example` and name it `.env`.
158
- Replace `YOUR_API_KEY` with your SerpApi API key.
169

17-
3. Install dependencies and run example
10+
2. Install dependencies and run example
1811

1912
```bash
20-
cd examples/node/basic_ts_node_14_up
2113
npm i
2214
npm start
2315
```
24-
25-
## Notes
26-
27-
- If you want to run the example without building the module, you can update
28-
`package.json` to depend on the published `serpapi` npm module instead:
29-
```json
30-
{
31-
"type": "module",
32-
"dependencies": {
33-
"dotenv": "*",
34-
"serpapi": "*" // Relies on the npm module
35-
},
36-
"devDependencies": {
37-
"@types/node": "*",
38-
"typescript": "*"
39-
},
40-
"scripts": {
41-
"start": "npx ts-node example.ts"
42-
}
43-
}
44-
```

examples/node/basic_ts_node_14_up/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"dependencies": {
44
"dotenv": "*",
5-
"serpapi": "../../../npm"
5+
"serpapi": "*"
66
},
77
"devDependencies": {
88
"@types/node": "*",

examples/node/pagination_js_node_14_up/README.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,14 @@
22

33
## Usage
44

5-
1. Build module
6-
7-
```bash
8-
cd ../../../ # Navigate to the root folder
9-
deno task npm
10-
```
11-
12-
2. Setup environment variables
5+
1. Setup environment variables
136

147
- Duplicate `.env.example` and name it `.env`.
158
- Replace `YOUR_API_KEY` with your SerpApi API key.
169

17-
3. Install dependencies and run example
10+
2. Install dependencies and run example
1811

1912
```bash
20-
cd examples/node/pagination_js_node_14_up
2113
npm i
2214
npm start
2315
```
24-
25-
## Notes
26-
27-
- If you want to run the example without building the module, you can update
28-
`package.json` to depend on the published `serpapi` npm module instead:
29-
```json
30-
{
31-
"type": "module",
32-
"dependencies": {
33-
"dotenv": "*",
34-
"serpapi": "*" // Relies on the npm module
35-
},
36-
"scripts": {
37-
"start": "node example.js"
38-
}
39-
}
40-
```

examples/node/pagination_js_node_14_up/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"dependencies": {
44
"dotenv": "*",
5-
"serpapi": "../../../npm"
5+
"serpapi": "*"
66
},
77
"scripts": {
88
"start": "node example.js"

examples/node/pagination_js_node_7_up/README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,14 @@
22

33
## Usage
44

5-
1. Build module
6-
7-
```bash
8-
cd ../../../ # Navigate to the root folder
9-
deno task npm
10-
```
11-
12-
2. Setup environment variables
5+
1. Setup environment variables
136

147
- Duplicate `.env.example` and name it `.env`.
158
- Replace `YOUR_API_KEY` with your SerpApi API key.
169

17-
3. Install dependencies and run example
10+
2. Install dependencies and run example
1811

1912
```bash
20-
cd examples/node/pagination_js_node_7_up
2113
npm i
2214
npm start
2315
```
24-
25-
## Notes
26-
27-
- If you want to run the example without building the module, you can update
28-
`package.json` to depend on the published `serpapi` npm module instead:
29-
```json
30-
{
31-
"dependencies": {
32-
"dotenv": "*",
33-
"serpapi": "*" // Relies on the npm module
34-
},
35-
"scripts": {
36-
"start": "node example.js"
37-
}
38-
}
39-
```

examples/node/pagination_js_node_7_up/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"dotenv": "*",
4-
"serpapi": "../../../npm"
4+
"serpapi": "*"
55
},
66
"scripts": {
77
"start": "node example.js"

0 commit comments

Comments
 (0)