-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore: ability to disable some plugins via config #6641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dawid-ziobro
merged 5 commits into
main
from
chore/ability-to-disable-some-plugins-via-config
Mar 10, 2022
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
09d7161
chore: adding ability to select plugins by passing custom config from…
Mateuszpietrusinski 1b64f83
chore: removing typo
Mateuszpietrusinski 78ef13b
changelog added and variable rename
dawid-ziobro a92991e
refactor: change nuxt-module to use ts and added api reference (#6663)
dawid-ziobro e2a5ffc
Added types for nuxt module
dawid-ziobro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
| module.exports = { | ||
| description: 'Added the ability to select plugins used by @vue-storefront/nuxt', | ||
| link: 'https://github.com/vuestorefront/vue-storefront/pull/6641', | ||
| isBreaking: false, | ||
| breakingChanges: [], | ||
| author: 'Mateusz Pietrusiński', | ||
| linkToGitHubAccount: 'https://github.com/Mateuszpietrusinski' | ||
| }; |
This file contains hidden or 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 hidden or 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,2 +1,2 @@ | ||
| node_modules | ||
| !lib | ||
| lib |
This file contains hidden or 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,10 @@ | ||
| { | ||
| "extends": "../../api-extractor.base.json", | ||
| "mainEntryPointFilePath": "./lib/src/api-extractor-data.d.ts", | ||
| "dtsRollup": { | ||
| "untrimmedFilePath": "./lib/<unscopedPackageName>.d.ts" | ||
| }, | ||
| "docModel": { | ||
| "apiJsonFilePath": "<projectFolder>/core/docs/reference/api/<unscopedPackageName>.api.json" | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
packages/core/nuxt-module/lib/modules/raw-sources-loader.js
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
1 change: 0 additions & 1 deletion
1
...s/core/nuxt-module/lib/plugins/context.js → packages/core/nuxt-module/plugins/context.js
This file contains hidden or 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 hidden or 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.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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,36 @@ | ||
| import pkg from './package.json'; | ||
| import typescript from 'rollup-plugin-typescript2'; | ||
| import { terser } from 'rollup-plugin-terser'; | ||
| import json from '@rollup/plugin-json'; | ||
|
|
||
| export function generateBaseConfig(pkg) { | ||
| return { | ||
| input: 'src/index.ts', | ||
| output: [ | ||
| { | ||
| file: pkg.main, | ||
| format: 'cjs', | ||
| sourcemap: true | ||
| }, | ||
| { | ||
| file: pkg.module, | ||
| format: 'es', | ||
| sourcemap: true | ||
| } | ||
| ], | ||
| external: [ | ||
| ...Object.keys(pkg.dependencies || {}) | ||
| ], | ||
| plugins: [ | ||
| typescript({ | ||
| // eslint-disable-next-line global-require | ||
| typescript: require('typescript'), | ||
| objectHashIgnoreUnknownHack: true | ||
| }), | ||
| terser(), | ||
| json() | ||
| ] | ||
| }; | ||
| } | ||
|
|
||
| export default generateBaseConfig(pkg); |
This file contains hidden or 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 @@ | ||
| /** | ||
| * Core Vue Storefront 2 nuxt module. | ||
| * | ||
| * @remarks | ||
| * The `@vue-storefront/nuxt` library is responsible for loading core nuxt plugins. | ||
| * | ||
| * @packageDocumentation | ||
| */ | ||
|
|
||
| export { default as VueStorefrontNuxtModule } from './index'; | ||
| export { ModuleOptions } from './types'; |
This file contains hidden or 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,3 @@ | ||
| import { ModuleOptions } from '../types'; | ||
|
|
||
| export default (options: ModuleOptions): boolean => process.env.NODE_ENV === 'production' || options.coreDevelopment; |
This file contains hidden or 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,12 @@ | ||
| import consola from 'consola'; | ||
| import chalk from 'chalk'; | ||
| import { Log } from '../types'; | ||
|
|
||
| const log: Log = Object.freeze({ | ||
| info: (message) => consola.info(chalk.bold('VSF'), message), | ||
| success: (message) => consola.success(chalk.bold('VSF'), message), | ||
| warning: (message) => consola.warn(chalk.bold('VSF'), message), | ||
| error: (message) => consola.error(chalk.bold('VSF'), message) | ||
| }); | ||
|
|
||
| export default log; |
This file contains hidden or 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 @@ | ||
| import { mergeWith, isArray } from 'lodash'; | ||
|
|
||
| export default (source, destination) => mergeWith(source, destination, (objValue, srcValue) => { | ||
| if (isArray(objValue)) { | ||
| return objValue.concat(srcValue); | ||
| } | ||
| }); | ||
This file contains hidden or 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 @@ | ||
| export default function resolveDependency(name: string): string { | ||
| try { | ||
| return require.resolve(name, { paths: [process.cwd()] }); | ||
| } catch (error) { | ||
| return ''; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.