-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathbuild_npm.ts
More file actions
77 lines (73 loc) · 1.84 KB
/
build_npm.ts
File metadata and controls
77 lines (73 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts";
import { version } from "../version.ts";
await emptyDir("./npm");
await build({
test: false, // Turned off to avoid publishing tests
typeCheck: false,
entryPoints: ["./mod.ts"],
rootTestDir: "./tests",
outDir: "./npm",
shims: {
// Tests require `Deno.test` and `Deno.env`.
// Although `Deno.version` is used, it doesn't need to be shimmed since
// it won't be used when the user runs the module in Node.
deno: "dev",
// https://deno.land/std/async/delay.ts relies on DOMException.
// This is only used in tests.
domException: "dev", // Only used in tests.
},
compilerOptions: {
// https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
lib: ["ES2017"],
target: "ES2017",
},
package: {
name: "serpapi",
version,
description: "Scrape and parse search engine results using SerpApi.",
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/serpapi/serpapi-javascript.git",
},
bugs: {
url: "https://github.com/serpapi/serpapi-javascript/issues",
},
keywords: [
"serpapi",
"serp api",
"scrape",
"google",
"search",
"api",
"query",
"json",
"html",
"image",
"automated",
"localization",
"news",
"seo",
"walmart",
"yahoo",
"yandex",
"scholar",
"bing",
"baidu",
"ebay",
"youtube",
"apple",
"store",
"app",
"homedepot",
"naver",
"duckduckgo",
],
contributors: [
{ name: "Sebastian Quek", email: "sebastian@serpapi.com" },
{ name: "Yicheng Zhou", email: "zyc9012@gmail.com" },
],
},
});
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");