-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds script to load ADRs from original path
* Moves ADRs back to their original path, at `doc/adr`. * Adds a script that copies the ADRs to a folder inside the project. The script runs automatically when the user starts the project with `yarn dev`. Before copying files the script compares folders and only copies folders and files that are missing. The script runs synchronously, so the project only starts after the ADRs have been synched. This commit allows the ADRs to be kept in their original folder in `theia-trace-extension`, as requested. Signed-off-by: Rodrigo Pinto <rodrigo.pinto@calian.ca>
- Loading branch information
1 parent
2d2e59f
commit efd503f
Showing
22 changed files
with
84 additions
and
26 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
.env.* | ||
/.svelte-kit | ||
/build | ||
/doc-sources | ||
/package | ||
node_modules | ||
vite.config.js.timestamp-* | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import fs from 'fs-extra' | ||
import { compareSync } from 'dir-compare' | ||
|
||
const src = '../adr/' | ||
const dest = 'doc-sources/adr-source/' | ||
|
||
const errorCallback = err => { | ||
if (err) throw err; | ||
} | ||
|
||
const options = { | ||
excludeFilter: '.DS_Store', | ||
compareSize: true | ||
} | ||
|
||
// Compare folders | ||
|
||
const comparison = compareSync(src, dest, options) | ||
|
||
// Copy missing files and folders | ||
|
||
if (!comparison.same) { | ||
comparison.diffSet.forEach(dif => { | ||
if (dif.state === 'left' && dif.path1 === src) { | ||
fs.copySync(src + dif.name1, dest + dif.name1, { recursive: true }, errorCallback) | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters