So, in summary, we have:
packages/
app/
tsconfig.json
shared/
tsconfig.json
tsconfig.base.json
tsconfig.json
| var MarkdownIt = require("markdown-it"); | |
| var md = new MarkdownIt('commonmark'); | |
| // Add custom INLINE rule that pulls in anything wrapped in a ::: <TEXT> ::: and wrap in a span tag | |
| function custom_inline(state, silent) { | |
| let pos = state.pos; |
| <style> | |
| .slider { | |
| border-radius: 0.5rem; | |
| margin: 1rem; | |
| min-height: 15rem; | |
| background: linear-gradient( | |
| to right, | |
| #314755, | |
| #26a0da | |
| ); /* Default Background */ |
So, in summary, we have:
packages/
app/
tsconfig.json
shared/
tsconfig.json
tsconfig.base.json
tsconfig.json
There are countless guides online for setting up a TypeScript monorepo.
Most rely on external tools like Lerna, Yarn, Turborepo, Yalc, or something else.
Here's a simple, zero-opinion way to get a monorepo going.
First, make a structure like this:
root/
See how a minor change to your commit message style can make a difference. Examples
Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs
| #!/usr/bin/env node | |
| var fs = require('fs'), | |
| util = require('util'); | |
| // Rattern to format the message with the issue ID | |
| var MESSAGE_FORMAT = '[%s] %s'; | |
| // Git commit messages are stored in a file, passed as argument to the script | |
| // First and second arguments will be 'node' and the name of the script | |
| var commitFile = process.argv[2]; |
| class Glob { | |
| constructor(glob) { | |
| this.glob = glob; | |
| // We implement glob matching using RegExp internally. | |
| // ? matches any one character except /, and * matches zero or more | |
| // of those characters. We use capturing groups around each. | |
| let regexpText = glob.replace("?", "([^/])").replace("*", "([^/]*)"); | |
| // We use the u flag to get Unicode-aware matching. |
| async function directoryToObject(dir, walkOpts){ | |
| const obj = {}; | |
| for await(const file of walk(dir, walkOpts)){ | |
| const path = relative(dir, file.path); | |
| const split = path.split("/"); | |
| let currObj = obj; | |
| for(let i = 0; i < split.length; i++){ | |
| const part = split[i]; |
| var now = new Date(); // Date object | |
| now.toDateString() // "Sun Jul 17 2016" | |
| now.toLocaleDateString() // "2016/7/17" | |
| now.toGMTString() // "Sun, 17 Jul 2016 03:16:49 GMT" | |
| now.toISOString() // "2016-07-17T03:16:49.141Z" | |
| now.toUTCString() // "Sun, 17 Jul 2016 03:16:49 GMT" | |
| now.toLocaleTimeString() // "δΈε11:16:49" | |
| now.toLocaleString() // "2016/7/17 δΈε11:16:49" | |
| now.toString() // "Sun Jul 17 2016 11:16:49 GMT+0800 (ε°εζ¨ζΊζι)" | |
| now.toTimeString() // "11:16:49 GMT+0800 (ε°εζ¨ζΊζι)" |