From 07bd005407b637200ea2caafbe09100793442ad2 Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Mon, 18 Sep 2023 17:06:44 +0200 Subject: [PATCH] Rename CSS and JS endpoints to use hyphenation --- .npmignore | 2 +- package.json | 4 ++-- src/docs/_assets/stylesheets/extra.css | 2 +- src/docs/_overrides/main.html | 12 ++++++------ ...ssCustomProperties.js => docsCustomProperties.js} | 0 webpack.config.babel.js | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) rename src/{cssCustomProperties.js => docsCustomProperties.js} (100%) diff --git a/.npmignore b/.npmignore index fe2556b2..562f3f2e 100644 --- a/.npmignore +++ b/.npmignore @@ -7,7 +7,7 @@ /site /src/**/__tests__ /src/docs/ -/src/cssCustomProperties.js +/src/docsCustomProperties.js /src/index.md /tests .browserslistrc diff --git a/package.json b/package.json index 2be2bc37..3cd024c7 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "bugs": { "url": "https://github.com/react-ui-org/react-ui/issues" }, - "main": "dist/reactui.js", + "main": "dist/react-ui.js", "repository": { "type": "git", "url": "https://github.com/react-ui-org/react-ui" @@ -34,7 +34,7 @@ }, "scripts": { "build": "webpack --mode=production", - "copy": "cp \"src/docs/_assets/generated/reactui.css\" dist & cp \"src/docs/_assets/generated/reactui.js\" dist", + "copy": "cp \"src/docs/_assets/generated/react-ui.css\" dist & cp \"src/docs/_assets/generated/react-ui.js\" dist", "eslint": "eslint --ext js,jsx src", "jest": "jest src --coverage", "lint": "npm run eslint && npm run markdownlint && npm run stylelint", diff --git a/src/docs/_assets/stylesheets/extra.css b/src/docs/_assets/stylesheets/extra.css index dd149c5a..ea2e9782 100644 --- a/src/docs/_assets/stylesheets/extra.css +++ b/src/docs/_assets/stylesheets/extra.css @@ -16,7 +16,7 @@ /* To improve component presentation we add padding inside the shadow DOM */ --docoff-preview-padding: 1em; /*Custom preview CSS file, typically this would be the CSS of your component */ - --docoff-preview-css: /docs/_assets/generated/reactui.css; + --docoff-preview-css: /docs/_assets/generated/react-ui.css; /* Visual configuration of the `` element */ --docoff-placeholder-background-dark: #4d4d4d; diff --git a/src/docs/_overrides/main.html b/src/docs/_overrides/main.html index 84d76044..2e9d1370 100644 --- a/src/docs/_overrides/main.html +++ b/src/docs/_overrides/main.html @@ -1,10 +1,10 @@ {% extends "base.html" %} {% block libs %} - - + + - + {% endblock %} @@ -17,14 +17,14 @@ - + - + - + {% endblock %} diff --git a/src/cssCustomProperties.js b/src/docsCustomProperties.js similarity index 100% rename from src/cssCustomProperties.js rename to src/docsCustomProperties.js diff --git a/webpack.config.babel.js b/webpack.config.babel.js index 5c5fdc26..df11fe28 100644 --- a/webpack.config.babel.js +++ b/webpack.config.babel.js @@ -12,8 +12,8 @@ module.exports = (env, argv) => ({ ? false : 'eval-cheap-module-source-map', entry: { - cssCustomProperties: Path.join(__dirname, 'src/cssCustomProperties.js'), - reactui: Path.join(__dirname, 'src/index.js'), + 'docs-custom-properties': Path.join(__dirname, 'src/docsCustomProperties.js'), + 'react-ui': Path.join(__dirname, 'src/index.js'), }, externals: { react: {