diff --git a/.prettierignore b/.prettierignore index 3511140e..7678bf74 100644 --- a/.prettierignore +++ b/.prettierignore @@ -13,5 +13,7 @@ .github .changeset +*.hbs + # Files pnpm-lock.yaml diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 614ecfe2..89e04915 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within diff --git a/README.md b/README.md index 0585b29c..d59f85ac 100644 --- a/README.md +++ b/README.md @@ -12,5 +12,3 @@ InoxTools offers a suite of "oxygen-free tools for Astronauts" - a playful nod t # License All the libraries under InoxTools as well as all the libraries defined in this repo are open-sourced software licensed under the MIT License. - - diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 9f95b6aa..f21cf215 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,3 @@ packages: -- turbo -- 'packages/*' + - turbo + - 'packages/*' diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index db58cc0c..678a223c 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -3,4 +3,4 @@ "allowJs": true }, "extends": "./tsconfig.base.json" -} \ No newline at end of file +} diff --git a/turbo/generators/app/index.ts b/turbo/generators/app/index.ts index e772699b..f2ccf151 100644 --- a/turbo/generators/app/index.ts +++ b/turbo/generators/app/index.ts @@ -1,43 +1,47 @@ -import {kebabCase} from 'lodash'; -import type {PlopTypes} from '@turbo/gen'; +import { kebabCase } from 'lodash'; +import type { PlopTypes } from '@turbo/gen'; import * as path from 'node:path'; import * as fs from 'node:fs/promises'; -export default (plop: PlopTypes.NodePlopAPI, {destBasePath}: PlopTypes.PlopCfg) => { +export default (plop: PlopTypes.NodePlopAPI, { destBasePath }: PlopTypes.PlopCfg) => { + plop.setGenerator('vite-plugin', { + description: 'Generate a new Vite plugin', + prompts: [ + { + name: 'name', + message: 'Plugin Name:', + validate: async (name) => { + const packageJsonPath = path.join( + destBasePath, + 'packages', + kebabCase(name), + 'package.json' + ); - plop.setGenerator('vite-plugin', { - description: 'Generate a new Vite plugin', - prompts: [ - { - name: 'name', - message: 'Plugin Name:', - validate: async (name) => { - const packageJsonPath = path.join(destBasePath, 'packages', kebabCase(name), 'package.json'); + try { + await fs.lstat(packageJsonPath); - try { - await fs.lstat(packageJsonPath); - - return `Package ${name} already exists`; - } catch { - return true; - } - } - }, - { - name: 'description', - message: 'Description:', - filter: desc => desc || undefined, - transformer: desc => desc || '', - }, - ], - actions: [ - { - type: 'addMany', - destination: '{{ turbo.paths.root }}/packages/{{ name }}', - templateFiles: `${__dirname}/templates/**/*`, - base: `${__dirname}/templates`, - verbose: true, - } - ], - }); -} + return `Package ${name} already exists`; + } catch { + return true; + } + }, + }, + { + name: 'description', + message: 'Description:', + filter: (desc) => desc || undefined, + transformer: (desc) => desc || '', + }, + ], + actions: [ + { + type: 'addMany', + destination: '{{ turbo.paths.root }}/packages/{{ name }}', + templateFiles: `${__dirname}/templates/**/*`, + base: `${__dirname}/templates`, + verbose: true, + }, + ], + }); +}; diff --git a/turbo/generators/config.ts b/turbo/generators/config.ts index 467b8bc8..0dd9aad6 100644 --- a/turbo/generators/config.ts +++ b/turbo/generators/config.ts @@ -1,14 +1,17 @@ -import type { PlopTypes } from "@turbo/gen"; +import type { PlopTypes } from '@turbo/gen'; -Object.assign(console, new console.Console({ - stdout: process.stdout, - stderr: process.stderr, - inspectOptions: { - colors: true, - depth: 4, - }, -})); +Object.assign( + console, + new console.Console({ + stdout: process.stdout, + stderr: process.stderr, + inspectOptions: { + colors: true, + depth: 4, + }, + }) +); export default function generator(plop: PlopTypes.NodePlopAPI): void { - plop.load('./app/index.ts'); + plop.load('./app/index.ts'); }