From 62a9288ea4a394517d8f4895f9f0a4759ac450d3 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 12 Jul 2021 16:22:43 +0530 Subject: [PATCH] refactor: update schema --- src/loader-options.json | 6 ++--- src/plugin-options.json | 14 ++++++------ .../validate-loader-options.test.js.snap | 4 ++-- .../validate-plugin-options.test.js.snap | 22 +++++++++---------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/loader-options.json b/src/loader-options.json index 173e1964..6d10fec2 100644 --- a/src/loader-options.json +++ b/src/loader-options.json @@ -13,17 +13,17 @@ } ], "description": "Specifies a custom public path for the external resources like images, files, etc inside CSS.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#publicpath" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#publicpath" }, "emit": { "type": "boolean", "description": "If true, emits a file (writes a file to the filesystem). If false, the plugin will extract the CSS but will not emit the file", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#emit" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#emit" }, "esModule": { "type": "boolean", "description": "Generates JS modules that use the ES modules syntax.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#esmodule" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#esmodule" }, "layer": { "type": "string" diff --git a/src/plugin-options.json b/src/plugin-options.json index 36be109b..7a4ce2c6 100644 --- a/src/plugin-options.json +++ b/src/plugin-options.json @@ -13,7 +13,7 @@ } ], "description": "This option determines the name of each output CSS file.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#filename" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#filename" }, "chunkFilename": { "anyOf": [ @@ -25,21 +25,21 @@ } ], "description": "This option determines the name of non-entry chunk files.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#chunkfilename" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#chunkfilename" }, "experimentalUseImportModule": { "type": "boolean", "description": "Enable the experimental importModule approach instead of using child compilers. This uses less memory and is faster.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#experimentaluseimportmodule" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#experimentaluseimportmodule" }, "ignoreOrder": { "type": "boolean", "description": "Remove Order Warnings.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#ignoreorder" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#ignoreorder" }, "insert": { "description": "Inserts `` at the given position.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#insert", + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#insert", "anyOf": [ { "type": "string" @@ -51,7 +51,7 @@ }, "attributes": { "description": "Adds custom attributes to tag.", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#attributes", + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#attributes", "type": "object" }, "linkType": { @@ -64,7 +64,7 @@ } ], "description": "This option allows loading asynchronous chunks with a custom link type", - "link": "https://webpack.js.org/plugins/mini-css-extract-plugin/#linktype" + "link": "https://github.com/webpack-contrib/mini-css-extract-plugin#linktype" } } } diff --git a/test/__snapshots__/validate-loader-options.test.js.snap b/test/__snapshots__/validate-loader-options.test.js.snap index 2692185d..a47a0bad 100644 --- a/test/__snapshots__/validate-loader-options.test.js.snap +++ b/test/__snapshots__/validate-loader-options.test.js.snap @@ -4,7 +4,7 @@ exports[`validate options should throw an error on the "esModule" option with "1 "Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema. - options.esModule should be a boolean. -> Generates JS modules that use the ES modules syntax. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#esmodule" + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#esmodule" `; exports[`validate options should throw an error on the "publicPath" option with "true" value 1`] = ` @@ -12,7 +12,7 @@ exports[`validate options should throw an error on the "publicPath" option with - options.publicPath should be one of these: string | function -> Specifies a custom public path for the external resources like images, files, etc inside CSS. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#publicpath + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#publicpath Details: * options.publicPath should be a string. * options.publicPath should be an instance of function." diff --git a/test/__snapshots__/validate-plugin-options.test.js.snap b/test/__snapshots__/validate-plugin-options.test.js.snap index be3c9988..8894c2b7 100644 --- a/test/__snapshots__/validate-plugin-options.test.js.snap +++ b/test/__snapshots__/validate-plugin-options.test.js.snap @@ -5,7 +5,7 @@ exports[`validate options should throw an error on the "attributes" option with - options.attributes should be an object: object { … } -> Adds custom attributes to tag. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#attributes" + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#attributes" `; exports[`validate options should throw an error on the "chunkFilename" option with "true" value 1`] = ` @@ -13,7 +13,7 @@ exports[`validate options should throw an error on the "chunkFilename" option wi - options.chunkFilename should be one of these: string | function -> This option determines the name of non-entry chunk files. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#chunkfilename + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#chunkfilename Details: * options.chunkFilename should be a string. * options.chunkFilename should be an instance of function." @@ -24,7 +24,7 @@ exports[`validate options should throw an error on the "filename" option with "t - options.filename should be one of these: string | function -> This option determines the name of each output CSS file. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#filename + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#filename Details: * options.filename should be a string. * options.filename should be an instance of function." @@ -34,7 +34,7 @@ exports[`validate options should throw an error on the "ignoreOrder" option with "Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema. - options.ignoreOrder should be a boolean. -> Remove Order Warnings. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#ignoreorder" + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#ignoreorder" `; exports[`validate options should throw an error on the "insert" option with "{}" value 1`] = ` @@ -42,7 +42,7 @@ exports[`validate options should throw an error on the "insert" option with "{}" - options.insert should be one of these: string | function -> Inserts \`\` at the given position. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#insert + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#insert Details: * options.insert should be a string. * options.insert should be an instance of function." @@ -53,7 +53,7 @@ exports[`validate options should throw an error on the "insert" option with "1" - options.insert should be one of these: string | function -> Inserts \`\` at the given position. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#insert + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#insert Details: * options.insert should be a string. * options.insert should be an instance of function." @@ -64,7 +64,7 @@ exports[`validate options should throw an error on the "insert" option with "tru - options.insert should be one of these: string | function -> Inserts \`\` at the given position. - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#insert + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#insert Details: * options.insert should be a string. * options.insert should be an instance of function." @@ -75,7 +75,7 @@ exports[`validate options should throw an error on the "linkType" option with "[ - options.linkType should be one of these: \\"text/css\\" | boolean -> This option allows loading asynchronous chunks with a custom link type - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#linktype + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#linktype Details: * options.linkType should be \\"text/css\\". * options.linkType should be a boolean." @@ -86,7 +86,7 @@ exports[`validate options should throw an error on the "linkType" option with "{ - options.linkType should be one of these: \\"text/css\\" | boolean -> This option allows loading asynchronous chunks with a custom link type - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#linktype + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#linktype Details: * options.linkType should be \\"text/css\\". * options.linkType should be a boolean." @@ -97,7 +97,7 @@ exports[`validate options should throw an error on the "linkType" option with "1 - options.linkType should be one of these: \\"text/css\\" | boolean -> This option allows loading asynchronous chunks with a custom link type - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#linktype + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#linktype Details: * options.linkType should be \\"text/css\\". * options.linkType should be a boolean." @@ -108,7 +108,7 @@ exports[`validate options should throw an error on the "linkType" option with "i - options.linkType should be one of these: \\"text/css\\" | boolean -> This option allows loading asynchronous chunks with a custom link type - -> Read more at https://webpack.js.org/plugins/mini-css-extract-plugin/#linktype + -> Read more at https://github.com/webpack-contrib/mini-css-extract-plugin#linktype Details: * options.linkType should be \\"text/css\\". * options.linkType should be a boolean."