Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni committed Jan 7, 2024
1 parent 6249e55 commit 8260cb3
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 64 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
.github
.changeset

*.hbs

# Files
pnpm-lock.yaml
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.


4 changes: 2 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- turbo
- 'packages/*'
- turbo
- 'packages/*'
2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"allowJs": true
},
"extends": "./tsconfig.base.json"
}
}
80 changes: 42 additions & 38 deletions turbo/generators/app/index.ts
Original file line number Diff line number Diff line change
@@ -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 || '<empty>',
},
],
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 || '<empty>',
},
],
actions: [
{
type: 'addMany',
destination: '{{ turbo.paths.root }}/packages/{{ name }}',
templateFiles: `${__dirname}/templates/**/*`,
base: `${__dirname}/templates`,
verbose: true,
},
],
});
};
23 changes: 13 additions & 10 deletions turbo/generators/config.ts
Original file line number Diff line number Diff line change
@@ -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');
}

0 comments on commit 8260cb3

Please sign in to comment.