-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
52 additions
and
12 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
If you see this file it means that you didn't run the init script. Please run it before continuing. |
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,16 @@ | ||
import chalk from "chalk" | ||
import * as fs from "fs/promises" | ||
import * as path from "path" | ||
import * as url from "url" | ||
|
||
const __dirname = url.fileURLToPath(new URL(".", import.meta.url)) | ||
const rootPath = path.join(__dirname, "..") | ||
|
||
export const completeInitialisation = async () => { | ||
await fs.unlink(path.join(rootPath, "scripts", ".init-todo")) | ||
console.log("\n") | ||
console.log(chalk.yellow("*".repeat(50))) | ||
console.log(chalk.green("Project initialized!")) | ||
console.log(chalk.red("Don't forget to change the license for production")) | ||
console.log(chalk.yellow("*".repeat(50))) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import chalk from "chalk" | ||
import * as fs from "fs/promises" | ||
import * as path from "path" | ||
import * as url from "url" | ||
|
||
const __dirname = url.fileURLToPath(new URL(".", import.meta.url)) | ||
const rootPath = path.join(__dirname, "..") | ||
|
||
try { | ||
await fs.access(path.join(rootPath, "scripts", ".init-todo")) | ||
console.log(chalk.red("Project not initialized!")) | ||
console.log(chalk.yellow("Run `npm run init` to initialize the project")) | ||
process.exit(1) | ||
} catch { | ||
// Do nothing | ||
} |
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