Skip to content

Commit bfc97d5

Browse files
authored
Merge pull request #23 from binhtran432k/feature/generator
feature(generator): enhance diagram generation
2 parents beed4ab + 158b445 commit bfc97d5

32 files changed

+1496
-48
lines changed

bun.lockb

146 KB
Binary file not shown.

package.json

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
2-
"name": "story-mapping-generator-monorepo",
3-
"private": true,
4-
"workspaces": [
5-
"packages/*"
6-
],
7-
"scripts": {
8-
"check": "bun run --cwd packages/www check",
9-
"lint": "bun run lint:www",
10-
"lint:www": "bun run --cwd packages/www lint",
11-
"build": "bun run --cwd packages/www build"
12-
},
13-
"devDependencies": {
14-
"@types/bun": "latest"
15-
},
16-
"peerDependencies": {
17-
"typescript": "^5.0.0"
18-
}
2+
"name": "story-mapping-generator-monorepo",
3+
"private": true,
4+
"workspaces": [
5+
"packages/*"
6+
],
7+
"scripts": {
8+
"check": "bun run --cwd packages/www check",
9+
"dev": "bun run --cwd packages/www dev",
10+
"lint": "bun run lint:www && bun run lint:generator",
11+
"lint:www": "bun run --cwd packages/www lint",
12+
"lint:generator": "bun run --cwd packages/generator lint",
13+
"format": "bun run format:www && bun run format:generator",
14+
"format:www": "bun run --cwd packages/www format",
15+
"format:generator": "bun run --cwd packages/generator format",
16+
"build": "bun run --cwd packages/www build"
17+
},
18+
"devDependencies": {
19+
"@types/bun": "latest"
20+
}
1921
}

packages/generator/.gitignore

+175
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
2+
3+
# Logs
4+
5+
logs
6+
_.log
7+
npm-debug.log_
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
.pnpm-debug.log*
12+
13+
# Caches
14+
15+
.cache
16+
17+
# Diagnostic reports (https://nodejs.org/api/report.html)
18+
19+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
20+
21+
# Runtime data
22+
23+
pids
24+
_.pid
25+
_.seed
26+
*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
30+
lib-cov
31+
32+
# Coverage directory used by tools like istanbul
33+
34+
coverage
35+
*.lcov
36+
37+
# nyc test coverage
38+
39+
.nyc_output
40+
41+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
42+
43+
.grunt
44+
45+
# Bower dependency directory (https://bower.io/)
46+
47+
bower_components
48+
49+
# node-waf configuration
50+
51+
.lock-wscript
52+
53+
# Compiled binary addons (https://nodejs.org/api/addons.html)
54+
55+
build/Release
56+
57+
# Dependency directories
58+
59+
node_modules/
60+
jspm_packages/
61+
62+
# Snowpack dependency directory (https://snowpack.dev/)
63+
64+
web_modules/
65+
66+
# TypeScript cache
67+
68+
*.tsbuildinfo
69+
70+
# Optional npm cache directory
71+
72+
.npm
73+
74+
# Optional eslint cache
75+
76+
.eslintcache
77+
78+
# Optional stylelint cache
79+
80+
.stylelintcache
81+
82+
# Microbundle cache
83+
84+
.rpt2_cache/
85+
.rts2_cache_cjs/
86+
.rts2_cache_es/
87+
.rts2_cache_umd/
88+
89+
# Optional REPL history
90+
91+
.node_repl_history
92+
93+
# Output of 'npm pack'
94+
95+
*.tgz
96+
97+
# Yarn Integrity file
98+
99+
.yarn-integrity
100+
101+
# dotenv environment variable files
102+
103+
.env
104+
.env.development.local
105+
.env.test.local
106+
.env.production.local
107+
.env.local
108+
109+
# parcel-bundler cache (https://parceljs.org/)
110+
111+
.parcel-cache
112+
113+
# Next.js build output
114+
115+
.next
116+
out
117+
118+
# Nuxt.js build / generate output
119+
120+
.nuxt
121+
dist
122+
123+
# Gatsby files
124+
125+
# Comment in the public line in if your project uses Gatsby and not Next.js
126+
127+
# https://nextjs.org/blog/next-9-1#public-directory-support
128+
129+
# public
130+
131+
# vuepress build output
132+
133+
.vuepress/dist
134+
135+
# vuepress v2.x temp and cache directory
136+
137+
.temp
138+
139+
# Docusaurus cache and generated files
140+
141+
.docusaurus
142+
143+
# Serverless directories
144+
145+
.serverless/
146+
147+
# FuseBox cache
148+
149+
.fusebox/
150+
151+
# DynamoDB Local files
152+
153+
.dynamodb/
154+
155+
# TernJS port file
156+
157+
.tern-port
158+
159+
# Stores VSCode versions used for testing VSCode extensions
160+
161+
.vscode-test
162+
163+
# yarn v2
164+
165+
.yarn/cache
166+
.yarn/unplugged
167+
.yarn/build-state.yml
168+
.yarn/install-state.gz
169+
.pnp.*
170+
171+
# IntelliJ based IDEs
172+
.idea
173+
174+
# Finder (MacOS) folder config
175+
.DS_Store

packages/generator/.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Package Managers
2+
package-lock.json
3+
pnpm-lock.yaml
4+
yarn.lock

packages/generator/.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100
6+
}

packages/generator/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# story-mappping-js
2+
3+
To install dependencies:
4+
5+
```bash
6+
bun install
7+
```
8+
9+
To run:
10+
11+
```bash
12+
bun run index.js
13+
```
14+
15+
This project was created using `bun init` in bun v1.1.9. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.

packages/generator/eslint.config.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import js from '@eslint/js';
2+
import prettier from 'eslint-config-prettier';
3+
import globals from 'globals';
4+
5+
/** @type {import('eslint').Linter.FlatConfig[]} */
6+
// @ts-ignore
7+
export default [
8+
prettier,
9+
js.configs.recommended,
10+
{
11+
languageOptions: {
12+
globals: {
13+
...globals.browser,
14+
...globals.node
15+
}
16+
}
17+
},
18+
{
19+
ignores: ['build/', 'dist/']
20+
}
21+
];

packages/generator/jsconfig.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"compilerOptions": {
3+
// Enable latest features
4+
"lib": ["ESNext", "DOM"],
5+
"target": "ESNext",
6+
"module": "ESNext",
7+
"moduleDetection": "force",
8+
"jsx": "react-jsx",
9+
"allowJs": true,
10+
11+
// Bundler mode
12+
"moduleResolution": "bundler",
13+
"allowImportingTsExtensions": true,
14+
"verbatimModuleSyntax": true,
15+
"noEmit": true,
16+
17+
// Best practices
18+
"strict": true,
19+
"skipLibCheck": true,
20+
"noFallthroughCasesInSwitch": true,
21+
22+
// Some stricter flags (disabled by default)
23+
"noUnusedLocals": false,
24+
"noUnusedParameters": false,
25+
"noPropertyAccessFromIndexSignature": false,
26+
"checkJs": true,
27+
"esModuleInterop": true,
28+
"forceConsistentCasingInFileNames": true,
29+
"resolveJsonModule": true,
30+
"sourceMap": true
31+
}
32+
}

packages/generator/package.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "story-mapping-generator",
3+
"type": "module",
4+
"module": "./src/index.js",
5+
"exports": {
6+
".": "./src/index.js"
7+
},
8+
"scripts": {
9+
"lint": "prettier --check . && eslint .",
10+
"format": "prettier --write ."
11+
},
12+
"devDependencies": {
13+
"@types/eslint": "^8.56.7",
14+
"eslint": "^9.0.0",
15+
"eslint-config-prettier": "^9.1.0",
16+
"prettier": "^3.1.1",
17+
"@types/bun": "latest"
18+
},
19+
"dependencies": {
20+
"yaml": "^2.4.5"
21+
}
22+
}

0 commit comments

Comments
 (0)