From 3b7f67a3bace195a3aaa9971b738aec11342af3a Mon Sep 17 00:00:00 2001 From: Nicolas Beaussart Date: Wed, 19 Feb 2020 13:04:16 +0100 Subject: [PATCH] :recycle: change plugin declaration for git js --- src/commands/add/prettier.ts | 5 +---- src/commands/add/tailwind.ts | 5 +---- src/utls/base-add-command.ts | 5 ++++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/commands/add/prettier.ts b/src/commands/add/prettier.ts index b46fe36..835ad70 100644 --- a/src/commands/add/prettier.ts +++ b/src/commands/add/prettier.ts @@ -2,12 +2,9 @@ import { BaseCommand } from '../../utls/base-command'; import { system, filesystem } from 'gluegun'; import * as prompts from 'prompts'; -import * as fs from 'fs'; -import { plugins, add, commit } from 'isomorphic-git'; +import { add, commit } from 'isomorphic-git'; import { BaseAddCommand } from '../../utls/base-add-command'; -plugins.set('fs', fs); - export default class Prettier extends BaseAddCommand { static description = 'add prettier to project and format it'; diff --git a/src/commands/add/tailwind.ts b/src/commands/add/tailwind.ts index 922ded7..4429eee 100644 --- a/src/commands/add/tailwind.ts +++ b/src/commands/add/tailwind.ts @@ -1,12 +1,9 @@ import { BaseCommand } from '../../utls/base-command'; import { system, filesystem, patching } from 'gluegun'; import * as prompts from 'prompts'; -import * as fs from 'fs'; -import { plugins, add, commit } from 'isomorphic-git'; +import { add, commit } from 'isomorphic-git'; import { BaseAddCommand } from '../../utls/base-add-command'; -plugins.set('fs', fs); - export default class Tailwind extends BaseAddCommand { static description = 'add tailwindcss to a project'; diff --git a/src/utls/base-add-command.ts b/src/utls/base-add-command.ts index 2dfd6e4..0f3b453 100644 --- a/src/utls/base-add-command.ts +++ b/src/utls/base-add-command.ts @@ -1,7 +1,10 @@ import { BaseCommand } from './base-command'; -import { add, commit, config as gitConfig, statusMatrix } from 'isomorphic-git'; +import { add, plugins, commit, config as gitConfig, statusMatrix } from 'isomorphic-git'; import * as latestVersion from 'latest-version'; import { filesystem, system } from 'gluegun'; +import * as fs from 'fs'; + +plugins.set('fs', fs); export abstract class BaseAddCommand extends BaseCommand { static flags = {