Skip to content
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

Rename CSS and JS endpoints to use hyphenation #490

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/site
/src/**/__tests__
/src/docs/
/src/cssCustomProperties.js
/src/docsCustomProperties.js
/src/index.md
/tests
.browserslistrc
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/docs/_assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<docoff-placeholder>` element */
--docoff-placeholder-background-dark: #4d4d4d;
Expand Down
12 changes: 6 additions & 6 deletions src/docs/_overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% extends "base.html" %}

{% block libs %}
<!-- We need to load this to make them accessible on the document root (outside shadowDOM) to preview colors etc. -->
<link rel="stylesheet" href="/docs/_assets/generated/cssCustomProperties.css" />
<!-- We need to load CSS custom properties to make them accessible in the document root (outside shadowDOM) so we can preview colors etc. -->
<link rel="stylesheet" href="/docs/_assets/generated/docs-custom-properties.css" />

<!-- We load Prism by hand to match style used by Docoff -->
<!-- We load Prism by hand to match the style used by Docoff -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/themes/prism-twilight.min.css" />
{% endblock %}

Expand All @@ -17,14 +17,14 @@
<script crossorigin src="https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.core.umd.min.js"></script>
<script crossorigin src="https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.dom.umd.min.js"></script>
<script crossorigin src="https://unpkg.com/@floating-ui/[email protected]/dist/floating-ui.react-dom.umd.min.js"></script>
<script src="/docs/_assets/generated/reactui.js" type="application/javascript"></script>
<script src="/docs/_assets/generated/react-ui.js" type="application/javascript"></script>
<script src="/docs/_assets/js/ruiIcon.js" type="application/javascript"></script>
<script src="/docs/_assets/js/ruiSwatch.js" type="application/javascript"></script>

<!-- Then we load and init Docoff -->
<!-- Then load and init Docoff -->
<script crossorigin src="https://unpkg.com/@react-ui-org/[email protected]/public/generated/bundle.js"></script>

<!-- Then we load non-Docoff code highlighiting -->
<!-- Then load non-Docoff code highlighiting -->
<script src="https://unpkg.com/[email protected]/components/prism-core.min.js"></script>
<script src="https://unpkg.com/[email protected]/plugins/autoloader/prism-autoloader.min.js"></script>
{% endblock %}
File renamed without changes.
4 changes: 2 additions & 2 deletions webpack.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Loading