This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
93 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import cli from 'cli-ux' | ||
|
||
export default function () { | ||
cli.log('ran init hook') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "ts-plugin", | ||
"private": true, | ||
"dxcli": { | ||
"plugins": "./lib/plugins", | ||
"commands": "./lib/commands", | ||
"hooks": { | ||
"init": "./lib/hooks/init" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Command from '@dxcli/command' | ||
import cli from 'cli-ux' | ||
|
||
export default class extends Command { | ||
async run() { | ||
cli.log('it works!') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import cli from 'cli-ux' | ||
|
||
export default function () { | ||
cli.log('loading plugins') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./lib", | ||
"rootDirs": [ | ||
"./src" | ||
] | ||
}, | ||
"include": [ | ||
"./src/**/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {expect, fancy} from 'fancy-test' | ||
import * as path from 'path' | ||
|
||
import * as Config from '../src' | ||
|
||
const root = path.resolve(__dirname, 'fixtures/typescript') | ||
|
||
describe('typescript', () => { | ||
fancy | ||
.it('has props', async () => { | ||
const config = await Config.read({root}) | ||
const p = (p: string) => path.join(root, p) | ||
expect(config).to.deep.include({ | ||
commandsDir: p('lib/commands'), | ||
commandsDirTS: p('src/commands'), | ||
pluginsModule: p('lib/plugins'), | ||
pluginsModuleTS: p('src/plugins'), | ||
hooks: {init: [p('lib/hooks/init')]}, | ||
hooksTS: {init: [p('src/hooks/init')]}, | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{ | ||
"extends": "@dxcli/tslint" | ||
"extends": "@dxcli/tslint", | ||
"linterOptions": { | ||
"exclude": [ | ||
"test/fixtures/**" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters