-
Notifications
You must be signed in to change notification settings - Fork 907
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename compiler extension from "compile" to "@teambit/compiler" (#2855)
also, change the extension to the new format (with a class).
- Loading branch information
1 parent
7138e50
commit e403658
Showing
9 changed files
with
97 additions
and
100 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
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,25 +1,19 @@ | ||
import { ExtensionManifest } from '@teambit/harmony'; | ||
import { WorkspaceExt } from '../workspace'; | ||
import { Environments } from '../environments'; | ||
import { Workspace } from '../workspace'; | ||
import { CLIExtension } from '../cli'; | ||
import { CompileCmd } from './compiler.cmd'; | ||
import { Compile } from './compile'; | ||
import { CompilerTask } from './compiler.task'; | ||
import { Extensions } from '../../constants'; | ||
|
||
const name = 'compile'; | ||
|
||
export default { | ||
name, | ||
dependencies: [CLIExtension, WorkspaceExt, Environments], | ||
provider: provideCompile, | ||
} as ExtensionManifest; | ||
|
||
export type CompileDeps = [CLIExtension, Workspace, Environments]; | ||
|
||
export async function provideCompile([cli, workspace, envs]: CompileDeps) { | ||
const compilerTask = new CompilerTask(name); | ||
const compile = new Compile(workspace, envs, compilerTask); | ||
cli.register(new CompileCmd(compile)); | ||
return compile; | ||
export class CompilerExtension { | ||
static id = Extensions.compiler; | ||
static dependencies = [CLIExtension, WorkspaceExt, Environments]; | ||
static async provider([cli, workspace, envs]: [CLIExtension, Workspace, Environments]) { | ||
const compilerTask = new CompilerTask(CompilerExtension.id); | ||
const compile = new Compile(workspace, envs, compilerTask); | ||
cli.register(new CompileCmd(compile)); | ||
return compile; | ||
} | ||
} |
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,3 @@ | ||
export { Compile } from './compile'; | ||
export { Compiler } from './types'; | ||
export { default as CompileExt } from './compiler.extension'; | ||
export { CompilerExtension } from './compiler.extension'; |
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
Oops, something went wrong.