-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(js-plugin): expect a factory function to be passed for the full …
…plugin rather than scaffolder
- Loading branch information
Showing
5 changed files
with
51 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ $ npm install @form8ion/eslint-config-extender --save-prod | |
const {packageManagers} = await import('@form8ion/javascript-core'); | ||
const githubPlugin = await import('@form8ion/github'); | ||
const {questionNames: projectQuestionNames} = await import('@form8ion/project'); | ||
const {scaffold: javascriptScaffolder, questionNames: jsQuestionNames} = await import('@form8ion/javascript'); | ||
const javascriptPlugin = await import('@form8ion/javascript'); | ||
const {scaffold, extendEslintConfig} = await import('./lib/index.mjs'); | ||
``` | ||
|
||
|
@@ -83,18 +83,21 @@ const {scaffold, extendEslintConfig} = await import('./lib/index.mjs'); | |
[projectQuestionNames.GIT_REPO]: true, | ||
[projectQuestionNames.REPO_HOST]: 'GitHub', | ||
[projectQuestionNames.REPO_OWNER]: 'org-name', | ||
[jsQuestionNames.AUTHOR_NAME]: 'John Smith', | ||
[jsQuestionNames.AUTHOR_EMAIL]: '[email protected]', | ||
[jsQuestionNames.AUTHOR_URL]: 'https://smith.org', | ||
[jsQuestionNames.SCOPE]: 'org-name', | ||
[jsQuestionNames.PACKAGE_MANAGER]: packageManagers.NPM, | ||
[jsQuestionNames.NODE_VERSION_CATEGORY]: 'LTS', | ||
[jsQuestionNames.CI_SERVICE]: 'Other', | ||
[jsQuestionNames.PROVIDE_EXAMPLE]: false | ||
[javascriptPlugin.questionNames.AUTHOR_NAME]: 'John Smith', | ||
[javascriptPlugin.questionNames.AUTHOR_EMAIL]: '[email protected]', | ||
[javascriptPlugin.questionNames.AUTHOR_URL]: 'https://smith.org', | ||
[javascriptPlugin.questionNames.SCOPE]: 'org-name', | ||
[javascriptPlugin.questionNames.PACKAGE_MANAGER]: packageManagers.NPM, | ||
[javascriptPlugin.questionNames.NODE_VERSION_CATEGORY]: 'LTS', | ||
[javascriptPlugin.questionNames.CI_SERVICE]: 'Other', | ||
[javascriptPlugin.questionNames.PROVIDE_EXAMPLE]: false | ||
}, | ||
plugins: {vcsHosts: {GitHub: githubPlugin}} | ||
}, | ||
decisions => options => javascriptScaffolder({...options, decisions, unitTestFrameworks: {}}) | ||
decisions => ({ | ||
...javascriptPlugin, | ||
scaffold: options =>javascriptPlugin.scaffold({...options, decisions, unitTestFrameworks: {}}) | ||
}) | ||
); | ||
})(); | ||
``` | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ td.when(execa('npm', ['whoami'])).thenResolve({stdout: any.word()}); | |
const {packageManagers} = await import('@form8ion/javascript-core'); | ||
const githubPlugin = await import('@form8ion/github'); | ||
const {questionNames: projectQuestionNames} = await import('@form8ion/project'); | ||
const {scaffold: javascriptScaffolder, questionNames: jsQuestionNames} = await import('@form8ion/javascript'); | ||
const javascriptPlugin = await import('@form8ion/javascript'); | ||
const {scaffold, extendEslintConfig} = await import('./lib/index.mjs'); | ||
|
||
// remark-usage-ignore-next | ||
|
@@ -55,17 +55,20 @@ stubbedFs({node_modules: stubbedNodeModules}); | |
[projectQuestionNames.GIT_REPO]: true, | ||
[projectQuestionNames.REPO_HOST]: 'GitHub', | ||
[projectQuestionNames.REPO_OWNER]: 'org-name', | ||
[jsQuestionNames.AUTHOR_NAME]: 'John Smith', | ||
[jsQuestionNames.AUTHOR_EMAIL]: '[email protected]', | ||
[jsQuestionNames.AUTHOR_URL]: 'https://smith.org', | ||
[jsQuestionNames.SCOPE]: 'org-name', | ||
[jsQuestionNames.PACKAGE_MANAGER]: packageManagers.NPM, | ||
[jsQuestionNames.NODE_VERSION_CATEGORY]: 'LTS', | ||
[jsQuestionNames.CI_SERVICE]: 'Other', | ||
[jsQuestionNames.PROVIDE_EXAMPLE]: false | ||
[javascriptPlugin.questionNames.AUTHOR_NAME]: 'John Smith', | ||
[javascriptPlugin.questionNames.AUTHOR_EMAIL]: '[email protected]', | ||
[javascriptPlugin.questionNames.AUTHOR_URL]: 'https://smith.org', | ||
[javascriptPlugin.questionNames.SCOPE]: 'org-name', | ||
[javascriptPlugin.questionNames.PACKAGE_MANAGER]: packageManagers.NPM, | ||
[javascriptPlugin.questionNames.NODE_VERSION_CATEGORY]: 'LTS', | ||
[javascriptPlugin.questionNames.CI_SERVICE]: 'Other', | ||
[javascriptPlugin.questionNames.PROVIDE_EXAMPLE]: false | ||
}, | ||
plugins: {vcsHosts: {GitHub: githubPlugin}} | ||
}, | ||
decisions => options => javascriptScaffolder({...options, decisions, unitTestFrameworks: {}}) | ||
decisions => ({ | ||
...javascriptPlugin, | ||
scaffold: options => javascriptPlugin.scaffold({...options, decisions, unitTestFrameworks: {}}) | ||
}) | ||
); | ||
})(); |
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