drizzle-auto 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -7
- package/package.json +2 -16
package/index.js
CHANGED
|
@@ -20,7 +20,7 @@ const projectRoot = getProjectRoot();
|
|
|
20
20
|
const pkgPath = path.join(projectRoot, "package.json");
|
|
21
21
|
|
|
22
22
|
/* =========================
|
|
23
|
-
✍️ Inject "tea" script
|
|
23
|
+
✍️ Inject "tea" script automatically
|
|
24
24
|
========================= */
|
|
25
25
|
function injectTeaScript() {
|
|
26
26
|
if (!fs.existsSync(pkgPath)) return;
|
|
@@ -58,19 +58,18 @@ function runPipeline() {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/* =========================
|
|
61
|
-
👀 Postinstall
|
|
61
|
+
👀 Postinstall hook
|
|
62
62
|
========================= */
|
|
63
|
-
if (process.argv.includes("--postinstall")) {
|
|
63
|
+
if (process.argv.includes("--postinstall") || process.env.npm_config_argv) {
|
|
64
64
|
injectTeaScript();
|
|
65
|
-
runPipeline();
|
|
66
|
-
process.exit(0);
|
|
65
|
+
runPipeline();
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
/* =========================
|
|
70
|
-
👀 Watcher
|
|
69
|
+
👀 Watcher for any changes
|
|
71
70
|
========================= */
|
|
72
71
|
injectTeaScript();
|
|
73
|
-
runPipeline(); //
|
|
72
|
+
runPipeline(); // run immediately on npx drizzle-auto
|
|
74
73
|
|
|
75
74
|
chokidar
|
|
76
75
|
.watch(projectRoot, {
|
package/package.json
CHANGED
|
@@ -1,28 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-auto",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Auto Drizzle sync with tea script injection",
|
|
5
|
-
"main": "index.js",
|
|
3
|
+
"version": "1.0.7",
|
|
6
4
|
"bin": {
|
|
7
5
|
"drizzle-auto": "index.js"
|
|
8
6
|
},
|
|
9
7
|
"scripts": {
|
|
10
8
|
"postinstall": "node index.js --postinstall"
|
|
11
9
|
},
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"access": "public"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"drizzle",
|
|
17
|
-
"automation",
|
|
18
|
-
"nextjs",
|
|
19
|
-
"watcher",
|
|
20
|
-
"tea"
|
|
21
|
-
],
|
|
22
|
-
"author": "Pavel Ahmmed Hridoy",
|
|
23
|
-
"license": "MIT",
|
|
24
10
|
"dependencies": {
|
|
25
11
|
"chokidar": "^4.0.1",
|
|
26
12
|
"cross-spawn": "^7.0.6"
|
|
27
13
|
}
|
|
28
|
-
}
|
|
14
|
+
}
|