Skip to content

Commit

Permalink
docs: ✏️ Adjusted Mermaid JS generation output dir
Browse files Browse the repository at this point in the history
  • Loading branch information
deltoss committed Dec 4, 2019
1 parent c5f2807 commit 56d09ae
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
6 changes: 5 additions & 1 deletion projects/mitch-datasource-documentation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ package-lock.json
# file. CI/CD process ensures these are
# built and deployed, so no need to
# check it into source control.
docs
docs

# Ignore built generated files.
# For example, by mermaid JS.
manual/generated-files/
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ graph RL;
subgraph Circle CI
CICDService[CircleCI Service] ==> Build
Build ==> Test
Test ==> NetlifyCli[Netlify CLI]
Test ==> CommitAnalysis{Any Release Commits?}
CommitAnalysis ==>|Yes| SemanticRelease[Semantic Release]
NetlifyCli
end
NetlifyCli == Deploys Docs ==> NetlifySite
NetlifyCli -. Deploys Docs .-> NetlifySite;
SemanticRelease -. Uses .-> NetlifyCli[Netlify CLI];
SemanticRelease -. Publishes To .-> npmpackage[mitch-datasource Package];
SemanticRelease -. Tag Commit .-> Repo;
SemanticRelease -. Create GitHub Release .-> Repo;
SemanticRelease -. CHANGELOG.md Update .-> Repo;
subgraph Netlify
NetlifySite[Netlify Site]
end
Expand Down
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions projects/mitch-datasource-documentation/manual/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This repository contains multiple projects. Each project has a specific set of r

The relationship between all the above projects can be illustrated as per below:

![mitch-datasource architecture diagram](asset/Architecture.png)
![mitch-datasource architecture diagram](generated-files/Architecture.png)

Each project has their own set of scripts which you can run. However, for general use,
you can simply just use the scripts located at the root of this repository in `package.json`.
Expand Down Expand Up @@ -45,7 +45,7 @@ Note that steps 3 & 5 can be substituted through a GIT GUI tool (e.g. SourceTree

### CI/CD

![mitch-datasource CI/CD flow diagram](asset/CircleCI%20Workflow.png)
![mitch-datasource CI/CD flow diagram](generated-files/CircleCI%20Workflow.png)

This package has a CI/CD pipeline with CircleCI configured. It has a workflow setup to use `semantic-release` so that if it detect any commits that requires a release (e.g. adding a new feature, breaking changes, fixes, etc), it'll perform various release related tasks including:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const mermaidFolderPaths = process.argv.slice(2);
mermaidFolderPaths.forEach((mermaidFolderPath) => {
const mermaidFilePaths = glob.sync(`${mermaidFolderPath}/**/*.mmd`);
mermaidFilePaths.forEach((mermaidFilePath) => {
const dirName = path.dirname(mermaidFilePath);
const dirName = path.dirname(mermaidFilePath).replace('/asset', '/generated-files');
console.log(dirName);
const fileName = path.basename(mermaidFilePath, '.mmd');
const mermaidOutputFilePath = `${dirName}/${fileName}.png`;
const command = `mmdc -i \"${mermaidFilePath}\" -o \"${mermaidOutputFilePath}\" -b transparent -t neutral`;
Expand Down

0 comments on commit 56d09ae

Please sign in to comment.