Browse Source

♻️ change plugin declaration for git js

pull/24/head
Nicolas Beaussart 6 years ago
parent
commit
3b7f67a3ba
No known key found for this signature in database GPG Key ID: 51D5A407BFCE64A9
  1. 5
      src/commands/add/prettier.ts
  2. 5
      src/commands/add/tailwind.ts
  3. 5
      src/utls/base-add-command.ts

5
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';

5
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';

5
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 = {

Loading…
Cancel
Save