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

fix: update fuel ui to fix light/dark theme #48

Merged
merged 6 commits into from
Sep 7, 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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs
public/shiki
guide-examples
.contentlayer
src/generated
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ docs
!src/pages/docs
public/shiki
.contentlayer
src/generated
31 changes: 30 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
const { withContentlayer } = require('next-contentlayer');
const path = require('path');

const HAS_LINK_DEPS = Boolean(
(process.env.LINK_DEPS?.trim().split(' ').filter(Boolean) || []).length
);

const depsLinkOpts = {
transpilePackages: [
'@fuel-ui/react',
'@fuel-ui/css',
'@fuel-ui/icons',
'@fuel-ui/tokens',
],
webpack: (config, options) => {
if (options.isServer) {
config.externals = ['react', ...config.externals];
}
config.resolve.alias['react'] = path.resolve(
__dirname,
'.',
'node_modules',
'react'
);

return config;
},
};

/**
* @type {import('next').NextConfig}
*/

const nextConfig = {
basePath: process.env.DOCS_BASE_URL || '',
experimental: {
esmExternals: false,
externalDir: true,
swcMinify: true,
},
eslint: {
ignoreDuringBuilds: true,
Expand Down Expand Up @@ -40,6 +68,7 @@ const nextConfig = {
// !! WARN !!
ignoreBuildErrors: true,
},
...(HAS_LINK_DEPS ? depsLinkOpts : {}),
};

module.exports = withContentlayer(nextConfig);
71 changes: 28 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,33 @@
"build:ci": "run-s docs:* generate:* build",
"check": "run-s lint prettier:check",
"check:prod": "run-s lint:prod prettier:check",
"docs:sync": "sh ./scripts/sync-repos.sh",
"docs:clean": "sh ./scripts/clean-build-files.sh",
"copy:icons": "cp -r ./node_modules/@fuel-ui/icons/dist/icons/sprite.svg ./public/icons",
"deps:update": "updates -gu",
"dev": "pnpm generate:links && pnpm generate:components && next dev",
"dev": "./scripts/dev.sh",
"docs:clean": "sh ./scripts/clean-build-files.sh",
"docs:sync": "sh ./scripts/sync-repos.sh",
"export": "DOCS_DIST=${DOCS_DIST:=dist} next export -o $DOCS_DIST",
"generate:links": "node scripts/generate-links.mjs",
"generate:components": "node scripts/components.mjs",
"lint": "eslint . --ext .ts,.tsx,.js,.jsx",
"lint:fix": "pnpm lint --fix",
"lint:prod": "eslint . --ext .ts,.tsx,.js,.jsx -c .eslintrc.prod",
"prepare": "husky install",
"prepare": "husky install && pnpm copy:icons",
"prettier:check": "prettier --check .",
"prettier:format": "prettier --write .",
"start": "next start",
"ts:check": "tsc --noEmit"
},
"dependencies": {
"@docsearch/css": "^3.5.1",
"@docsearch/react": "3.5.1",
"@fuel-ui/config": "^0.17.0",
"@fuel-ui/css": "^0.16.1",
"@fuel-ui/react": "^0.16.1",
"@docsearch/css": "^3.5.2",
"@docsearch/react": "3.5.2",
"@fuel-ui/css": "0.21.0-pr-305-04b8434",
"@fuel-ui/icons": "0.21.0-pr-305-04b8434",
"@fuel-ui/react": "0.21.0-pr-305-04b8434",
"@fuel-wallet/sdk": "^0.12.3",
"@fuels/eslint-plugin": "^0.0.3",
"@fuels/prettier-config": "^0.0.3",
"@fuels/ts-config": "^0.0.3",
"@fuels/eslint-plugin": "^0.0.8",
"@fuels/prettier-config": "^0.0.8",
"@fuels/ts-config": "^0.0.8",
"@mdx-js/mdx": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@tanstack/react-query": "^4.33.0",
Expand All @@ -44,7 +45,7 @@
"contentlayer": "^0.3.4",
"cookie": "^0.5.0",
"dotenv": "^16.3.1",
"framer-motion": "^10.13.1",
"framer-motion": "^10.16.4",
"fuels": "0.55.0",
"globby": "^13.2.2",
"gray-matter": "^4.0.3",
Expand All @@ -53,62 +54,46 @@
"hast-util-to-string": "^2.0.0",
"hast-util-to-text": "^3.1.2",
"hastscript": "^7.2.0",
"next": "13.4.12",
"next": "13.4.19",
"next-contentlayer": "^0.3.4",
"node-html-markdown": "^1.3.0",
"plyr-react": "^5.3.0",
"prettier": "2.8.0",
"react": "^18.2.0",
"react-aria": "^3.26.0",
"react-cookie": "^4.1.1",
"react-aria": "^3.27.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.45.4",
"react-hook-form": "^7.46.1",
"rehype-pretty-code": "^0.10.0",
"remark": "^14.0.3",
"remark-frontmatter": "^4.0.1",
"remark-gfm": "^3.0.1",
"remark-mdx": "^2.3.0",
"remark-parse": "^10.0.2",
"remark-slug": "^7.0.1",
"shiki": "^0.14.3",
"shiki": "^0.14.4",
"strip-indent": "^4.0.0",
"swr": "^2.2.0",
"swr": "^2.2.2",
"toml": "^3.0.0",
"unified": "^10.1.2",
"unist-util-visit": "^5.0.0",
"updates": "^14.3.4",
"updates": "^15.0.2",
"vfile": "^6.0.1"
},
"devDependencies": {
"@next/eslint-plugin-next": "^13.4.12",
"@types/chrome": "^0.0.242",
"@types/cookie": "^0.5.1",
"@types/node": "^20.4.5",
"@types/react": "^18.2.16",
"@types/chrome": "^0.0.245",
"@types/cookie": "^0.5.2",
"@types/node": "^20.5.9",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/react-syntax-highlighter": "^15.5.7",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"eslint": "^8.45.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-next": "13.4.12",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest-dom": "^5.0.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-testing-library": "^5.11.0",
"eslint": "^8.48.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"lint-staged": "^14.0.1",
"npm-run-all": "^4.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sharp": "^0.32.4",
"typescript": "^5.1.6"
"sharp": "^0.32.5",
"typescript": "^5.2.2"
},
"pnpm": {
"overrides": {
Expand Down
Loading