@clidey/dory 0.17.0 โ 0.18.0
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/bin/dory.js +6 -13
- package/k8s/Dockerfile +1 -1
- package/package.json +1 -1
package/bin/dory.js
CHANGED
|
@@ -14,21 +14,15 @@ const commands = {
|
|
|
14
14
|
build: () => {
|
|
15
15
|
console.log('๐ Dory is ready to build your docs!');
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const hasUserDocs = existsSync(userDocsDir);
|
|
20
|
-
|
|
21
|
-
// Use different temp directory if user has their own docs folder
|
|
22
|
-
const tempDirName = hasUserDocs ? '.dory-build-temp' : 'docs';
|
|
23
|
-
const docsDir = resolve(__dirname, '..', tempDirName);
|
|
24
|
-
|
|
25
|
-
// Clear the temp build folder if it exists
|
|
17
|
+
// Clear the docs folder if it exists
|
|
18
|
+
const docsDir = resolve(__dirname, '..', 'docs');
|
|
26
19
|
if (existsSync(docsDir)) {
|
|
27
20
|
console.log('๐งน Tidying up the workspace...');
|
|
28
21
|
rmSync(docsDir, { recursive: true, force: true });
|
|
29
22
|
}
|
|
30
23
|
|
|
31
24
|
// Check if dory.json exists in current directory
|
|
25
|
+
const currentDir = process.cwd();
|
|
32
26
|
const doryConfigPath = resolve(currentDir, 'dory.json');
|
|
33
27
|
|
|
34
28
|
if (!existsSync(doryConfigPath)) {
|
|
@@ -59,9 +53,8 @@ const commands = {
|
|
|
59
53
|
}
|
|
60
54
|
};
|
|
61
55
|
|
|
62
|
-
// Copy all files and directories except node_modules, dist, .git
|
|
63
|
-
|
|
64
|
-
const excludeDirs = ['node_modules', 'dist', '.git', 'pnpm-lock.yaml', tempDirName];
|
|
56
|
+
// Copy all files and directories except node_modules, dist, and .git
|
|
57
|
+
const excludeDirs = ['node_modules', 'dist', '.git', 'docs', 'pnpm-lock.yaml'];
|
|
65
58
|
|
|
66
59
|
const items = readdirSync(currentDir);
|
|
67
60
|
for (const item of items) {
|
|
@@ -95,7 +88,7 @@ const commands = {
|
|
|
95
88
|
}
|
|
96
89
|
rmSync(distDir, { recursive: true, force: true });
|
|
97
90
|
|
|
98
|
-
//
|
|
91
|
+
// Revert docs folder back to original state
|
|
99
92
|
console.log('๐งน Cleaning up...');
|
|
100
93
|
rmSync(docsDir, { recursive: true, force: true });
|
|
101
94
|
console.log('โ
All done!');
|
package/k8s/Dockerfile
CHANGED