-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
paths.js
38 lines (33 loc) · 987 Bytes
/
paths.js
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
import path from "path"
import { fileURLToPath } from "url"
import platforms from "platform-folders"
const gulpfilePath = fileURLToPath(import.meta.url)
const paths = {
assets: "assets",
buildDir: "build/",
confPrivExample: "conf.priv.example.js",
dirname: path.dirname(gulpfilePath),
favicons: "assets/favicons",
faviconsManifest: "favicons.json",
gulpfile: path.basename(gulpfilePath),
installDir: platforms.getConfigHome(),
srcDir: "src",
output: "surfingkeys.js",
pkgJson: "package.json",
readme: "README.tmpl.md",
readmeOut: "README.md",
screenshots: "assets/screenshots",
sources: {
api: "api.js",
actions: "actions.js",
conf: "conf.js",
confPriv: "conf.priv.js",
entrypoint: "index.js",
keys: "keys.js",
searchEngines: "search-engines.js",
util: "util.js",
},
}
export default paths
export const getPath = (...f) => path.join(paths.dirname, ...f)
export const getSrcPath = (...s) => getPath(paths.srcDir, ...s)