-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
20 changed files
with
6,964 additions
and
2,585 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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
#! /usr/bin/env node | ||
'use strict'; | ||
const env = require('yeoman-environment').createEnv(); | ||
const tabtab = require('tabtab')({ | ||
name: 'yo', | ||
cache: !process.env.YO_TEST | ||
}); | ||
const Completer = require('./completer'); | ||
|
||
const completer = new Completer(env); | ||
(async () => { | ||
// eslint-disable-next-line node/no-unsupported-features/es-syntax | ||
const {createEnv} = await import('yeoman-environment'); | ||
const completer = new Completer(createEnv()); | ||
|
||
tabtab.completer = completer; | ||
tabtab.completer = completer; | ||
|
||
// Lookup installed generator in yeoman environment, | ||
// respond completion results with each generator | ||
tabtab.on('yo', completer.complete.bind(completer)); | ||
// Lookup installed generator in yeoman environment, | ||
// respond completion results with each generator | ||
tabtab.on('yo', completer.complete.bind(completer)); | ||
|
||
// Register complete command | ||
tabtab.start(); | ||
// Register complete command | ||
tabtab.start(); | ||
})(); | ||
|
||
module.exports = tabtab; |
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,7 @@ | ||
function namespaceToName(namespace) { | ||
return namespace.split(':')[0]; | ||
} | ||
|
||
module.exports = { | ||
namespaceToName | ||
}; |
Oops, something went wrong.