Skip to content

Commit

Permalink
Merge branch 'master' into file-header-h2
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Dec 10, 2024
2 parents 6bc9a51 + 602052a commit bbb8ae5
Show file tree
Hide file tree
Showing 1,054 changed files with 4,900 additions and 11,661 deletions.
7 changes: 0 additions & 7 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ packages/*/.vscode
.yarn/*
.vercel
styled-system/*

.nx/cache
.nx/workspace-data
3 changes: 3 additions & 0 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.stories.tsx
*-test.ts
*-test.tsx
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ packages/**/.scss
.idea/
yarn.lock
packages/styled-system/**/*

/.nx/cache
/.nx/workspace-data
29 changes: 1 addition & 28 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
*/

import { StorybookConfig } from "@storybook/react-vite";
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../packages/**/*.stories.@(tsx|jsx)", "../stories/**/*.stories.@(tsx|jsx)"],
Expand All @@ -23,33 +23,6 @@ const config: StorybookConfig = {
"@storybook/addon-measure",
"@storybook/addon-outline",
],
core: {
builder: "@storybook/builder-vite",
},
viteFinal: async (config) => {
// Storybook imports these as CJS modules by default, but Vite wants them to be ESM.
// By importing them dynamically we can ensure they are ESM.
// TODO: Update this when Storybook no longer uses these as CJS.
const { mergeConfig } = await import("vite");
const react = await import("@vitejs/plugin-react");
const tsconfigPaths = await import("vite-tsconfig-paths");
return mergeConfig(config, {
plugins: [
tsconfigPaths.default({ root: "../" }),
react.default({
babel: {
overrides: [
{
exclude:
/primitives|preset-panda|styled-system|ndla-icons|ndla-ui|audio-search|image-search|video-search|util|error-reporter|tracker|article-converter/,
plugins: [["@emotion", { autoLabel: "always" }]],
},
],
},
}),
],
});
},
typescript: {
reactDocgen: "react-docgen-typescript",
// uncomment this for quicker HMR during dev.
Expand Down
9 changes: 3 additions & 6 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
*
*/

import { i18nInstance } from "@ndla/ui";
import { Preview } from "@storybook/react";
import { HelmetProvider } from "react-helmet-async";
import { I18nextProvider } from "react-i18next";
import { BrowserRouter } from "react-router-dom";
import { DocsPage, DocsContainer } from "@storybook/addon-docs";
import type { Preview } from "@storybook/react";
import { i18nInstance } from "@ndla/ui";
import "./styles.css";

const viewports = {
Expand Down Expand Up @@ -228,9 +227,7 @@ const preview: Preview = {
(Story) => (
<BrowserRouter>
<I18nextProvider i18n={i18nInstance}>
<HelmetProvider>
<Story />
</HelmetProvider>
<Story />
</I18nextProvider>
</BrowserRouter>
),
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ As mentioned on https://designmanual.ndla.no/?path=/story/components--icons, new
- Sizing is written in full (link-m-line = LinkMediumLine, arrow-up-s-line = ArrowUpShortLine)
- Some icons have several variants, indicated by numbers. Since we won't be using more than one such variant, the number is omitted

Icons are downloaded and placed in the best matching sub-folder in `frontend-packages/packages/ndla-icons/svg/`. Edit the svg and add license information matching the other svg files.
Icons are downloaded and placed in the best matching sub-folder in `frontend-packages/packages/icons/svg/`. Edit the svg and add license information matching the other svg files.

### Generate typescript component file

Expand Down
7 changes: 0 additions & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ module.exports = {
"@babel/preset-typescript",
["@babel/preset-react", { runtime: "automatic" }],
],
overrides: [
{
exclude:
/primitives|preset-panda|styled-system|ndla-icons|ndla-ui|audio-search|image-search|video-search|util|error-reporter|tracker|article-converter/,
plugins: [["@emotion", { autoLabel: "always" }]],
},
],
plugins: [],
env: {
test: {
Expand Down
4 changes: 0 additions & 4 deletions dummydata/index.js

This file was deleted.

File renamed without changes.
Loading

0 comments on commit bbb8ae5

Please sign in to comment.