Skip to content

Commit

Permalink
add quantum logo
Browse files Browse the repository at this point in the history
  • Loading branch information
atilafassina committed Oct 2, 2024
1 parent 00e3da6 commit d2bb042
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 12 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-quantum",
"version": "0.0.7",
"version": "0.0.8",
"type": "module",
"main": "./lib/index.js",
"license": "MIT",
Expand Down Expand Up @@ -28,7 +28,8 @@
},
"dependencies": {
"@clack/prompts": "^0.7.0",
"@tauri-apps/cli": "2.0.0-rc.17"
"@tauri-apps/cli": "2.0.0-rc.17",
"gradient-string": "^3.0.0"
},
"devDependencies": {
"@release-it/conventional-changelog": "^8.0.2",
Expand Down
30 changes: 30 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions src/lib/cli-helpers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
export function getFlag(cliArgs: string[], flag: string) {
export function hasDebugFlag(cliArgs: string[]) {
const flags = cliArgs.slice(2);

const index = flags.indexOf(flag);
if (index > -1 && flags[index + 1]) {
return flags[index + 1];
}
return null;
return flags.includes("--debug");
}

export const QUANTUM_ASCII = `
β–—β–„β–„β–„β–– β–—β–– β–—β–– β–—β–„β–– β–—β–– β–—β––β–—β–„β–„β–„β––β–—β–– β–—β––β–—β–– β–—β––
β–β–Œ β–β–Œ β–β–Œ β–β–Œβ–β–Œ β–β–Œβ–β–›β–šβ––β–β–Œ β–ˆ β–β–Œ β–β–Œβ–β–›β–šβ–žβ–œβ–Œ
β–β–Œ β–β–Œ β–β–Œ β–β–Œβ–β–›β–€β–œβ–Œβ–β–Œ β–β–œβ–Œ β–ˆ β–β–Œ β–β–Œβ–β–Œ β–β–Œ
β–β–™β–„β–Ÿβ–™β––β–β–šβ–„β–žβ–˜β–β–Œ β–β–Œβ–β–Œ β–β–Œ β–ˆ β–β–šβ–„β–žβ–˜β–β–Œ β–β–Œ
`;
9 changes: 5 additions & 4 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ import { handleCapabilities } from "./lib/templates/capabilities.js";
import { handleCargoToml } from "./lib/templates/cargo-toml.js";
import { handleMainRs } from "./lib/templates/main-rs.js";
import { handleReleaseAction } from "./lib/templates/release-action.js";
import { getFlag } from "./lib/cli-helpers.js";
import { hasDebugFlag, QUANTUM_ASCII } from "./lib/cli-helpers.js";
import { handleLibRs } from "./lib/templates/lib-rs.js";
import { vice } from "gradient-string";

const DEFAULT_KEY_PATH = (name: string) => `~/.tauri/keys/${name}.key`;

export async function run() {
intro(`Creating your Quantum app`);

const isDebugMode = getFlag(process.argv, "--debug");
console.log(vice.multiline(QUANTUM_ASCII));
intro("Welcome. Let's get you started. ✨");
const isDebugMode = hasDebugFlag(process.argv);

if (isDebugMode) {
log.warn("Debug mode is enabled");
Expand Down

0 comments on commit d2bb042

Please sign in to comment.