Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from nomiclabs/config-export-and-refactor
Config export and refactor
- Loading branch information
Showing
36 changed files
with
235 additions
and
184 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./dist/src/core/config/config-env"; | ||
export { BuidlerConfig } from "./dist/src/types"; |
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
File renamed without changes.
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
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
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
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,57 @@ | ||
import { ActionType, TaskArguments } from "../../types"; | ||
import * as argumentTypes from "../params/argumentTypes"; | ||
import { ConfigurableTaskDefinition } from "../tasks/task-definitions"; | ||
|
||
import dsl from "./tasks-dsl-instance"; | ||
|
||
export function task<ArgsT extends TaskArguments>( | ||
name: string, | ||
description?: string, | ||
action?: ActionType<ArgsT> | ||
): ConfigurableTaskDefinition; | ||
export function task<ArgsT extends TaskArguments>( | ||
name: string, | ||
action: ActionType<ArgsT> | ||
): ConfigurableTaskDefinition; | ||
export function task<ArgsT extends TaskArguments>( | ||
name: string, | ||
descriptionOrAction?: string | ActionType<ArgsT>, | ||
action?: ActionType<ArgsT> | ||
): ConfigurableTaskDefinition { | ||
if (descriptionOrAction === undefined) { | ||
return dsl.task(name); | ||
} | ||
|
||
if (typeof descriptionOrAction !== "string") { | ||
return dsl.task(name, descriptionOrAction); | ||
} | ||
|
||
return dsl.task(name, descriptionOrAction, action); | ||
} | ||
|
||
export function internalTask<ArgsT extends TaskArguments>( | ||
name: string, | ||
description?: string, | ||
action?: ActionType<ArgsT> | ||
): ConfigurableTaskDefinition; | ||
export function internalTask<ArgsT extends TaskArguments>( | ||
name: string, | ||
action: ActionType<ArgsT> | ||
): ConfigurableTaskDefinition; | ||
export function internalTask<ArgsT extends TaskArguments>( | ||
name: string, | ||
descriptionOrAction?: string | ActionType<ArgsT>, | ||
action?: ActionType<ArgsT> | ||
): ConfigurableTaskDefinition { | ||
if (descriptionOrAction === undefined) { | ||
return dsl.internalTask(name); | ||
} | ||
|
||
if (typeof descriptionOrAction !== "string") { | ||
return dsl.internalTask(name, descriptionOrAction); | ||
} | ||
|
||
return dsl.internalTask(name, descriptionOrAction, action); | ||
} | ||
|
||
export const types = argumentTypes; |
Oops, something went wrong.