@twobrake/create-monorepo 0.1.2 → 0.1.3
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/README.md +12 -4
- package/dist/index.mjs +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,14 +4,22 @@
|
|
|
4
4
|
<h1>Bun Monorepo</h1>
|
|
5
5
|
</div>
|
|
6
6
|
<div>
|
|
7
|
-
<img src="https://img.shields.io/github/actions/workflow/status/twobrake/bun-monorepo/lint.yml?branch=main&label=CI&style=for-the-badge" alt="CI State" />
|
|
8
|
-
<img src="https://img.shields.io/github/license/twobrake/bun-monorepo?style=for-the-badge&label=License&color=white" alt="License" />
|
|
9
|
-
<img src="https://img.shields.io/github/last-commit/twobrake/bun-monorepo?style=for-the-badge&label=Committed&color=orange" alt="Committed" />
|
|
10
|
-
<img src="https://img.shields.io/github/issues/twobrake/bun-monorepo?style=for-the-badge&label=Issues&color=red" alt="Issues" />
|
|
7
|
+
<img src="https://img.shields.io/github/actions/workflow/status/twobrake/bun-monorepo/lint.yml?branch=main&label=CI&style=for-the-badge&logo=githubactions" alt="CI State" />
|
|
8
|
+
<img src="https://img.shields.io/github/license/twobrake/bun-monorepo?style=for-the-badge&label=License&color=white&logo=unlicense" alt="License" />
|
|
9
|
+
<img src="https://img.shields.io/github/last-commit/twobrake/bun-monorepo?style=for-the-badge&label=Committed&color=orange&logo=git" alt="Committed" />
|
|
10
|
+
<img src="https://img.shields.io/github/issues/twobrake/bun-monorepo?style=for-the-badge&label=Issues&color=red&logo=github" alt="Issues" />
|
|
11
|
+
<img src="https://img.shields.io/npm/v/%40twobrake%2Fcreate-monorepo?style=for-the-badge&label=Installer Version&logo=npm&color=red" />
|
|
11
12
|
</div>
|
|
12
13
|
</div>
|
|
13
14
|
<div align="start">
|
|
14
15
|
<h2>Getting Started</h2>
|
|
15
16
|
<p>An opinionated starter template for TypeScript using the Bun ecosystem. The primary reason for this template being developed was to enhance the time it took for me to startup new projects without having to worry about restructuring the setup.</p>
|
|
16
17
|
<p>Obviously the structure isn't ideal for every project, but for general TypeScript setups that require a multi-package/app monorepo structure, this may be what you've been looking for.</p>
|
|
18
|
+
<p>A template/project can be created fairly easily due to our installation helper published on NPM. This is useable by running the following in your terminal.</p>
|
|
19
|
+
<pre><code>npx @twobrake/create-monorepo</code></pre>
|
|
20
|
+
<p>This will run the installation helper in your current directory and guide you through configuration steps to finalize the project. You will be asked to select a directory and it is important to prepare the directory <strong>before running the helper</strong>. Please ensure this directory is empty as an already populated directory could cause issues.</p>
|
|
21
|
+
<p>If you prefer Bun over NPM's CLI due to it's performance enhancements, feel free to use the following command instead of the one above.</p>
|
|
22
|
+
<pre><code>bunx @twobrake/create-monorepo</code></pre>
|
|
23
|
+
<h2>Contributions</h2>
|
|
24
|
+
<p>If you have a passionate interest in this project, feel free to make suggestions or direct contributions through <a href="https://github.com/TwoBrake/bun-monorepo/issues" target="_blank">GitHub issues</a>. You can also leave comments on other people's suggestions with more features you may want added. Please keep in mind, this project is not meant to be largely scaled as it is a starting point to <strong>your project</strong>.</p>
|
|
17
25
|
</div>
|
package/dist/index.mjs
CHANGED
|
@@ -40,7 +40,11 @@ const EXCLUDED_PACKAGE_SCRIPTS = new Set(["installer:build", "installer:publish"
|
|
|
40
40
|
const IGNORE_PATH_LIST = [
|
|
41
41
|
"packages/installer",
|
|
42
42
|
"packages/installer/**",
|
|
43
|
-
"README.md"
|
|
43
|
+
"README.md",
|
|
44
|
+
".github/images",
|
|
45
|
+
".github/images/**",
|
|
46
|
+
".github/workflows/publish-installer.yml",
|
|
47
|
+
".github/dependabot.yml"
|
|
44
48
|
];
|
|
45
49
|
const replaceOccurrences = async (data) => {
|
|
46
50
|
const { cwd, extensions, queries } = data;
|
|
@@ -73,7 +77,7 @@ const createPrompt = async (prompt) => {
|
|
|
73
77
|
const execute = promisify(exec);
|
|
74
78
|
//#endregion
|
|
75
79
|
//#region package.json
|
|
76
|
-
var version = "0.1.
|
|
80
|
+
var version = "0.1.3";
|
|
77
81
|
//#endregion
|
|
78
82
|
//#region src/index.ts
|
|
79
83
|
const main = async () => {
|
|
@@ -167,6 +171,9 @@ const main = async () => {
|
|
|
167
171
|
},
|
|
168
172
|
title: "Installing dependencies."
|
|
169
173
|
});
|
|
174
|
+
log.info(`Overview:\n\nProject Name: ${projectName}\nAuthor Name: ${authorName}\nAuthor Email: ${authorEmail}\nPath: ${targetDirectory}\nFramework: ${frameworkType}\nInstall Dependencies: ${shouldInstallDependencies ? "Yes" : "No"}`);
|
|
175
|
+
log.warn("Proceeding to the next step will start the installation process. Cancelling during it may cause unintended side-effects.");
|
|
176
|
+
if (!await createPrompt(async () => confirm({ message: "Are you sure you want to finalize the installation?" }))) throw new ActionAbortedError("User cancelled.");
|
|
170
177
|
await tasks(installationTasks);
|
|
171
178
|
outro(`Your project was successfully created at: ${clonedDirectory}`);
|
|
172
179
|
} catch (error) {
|