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 styleguide #353

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ yarn-error.log*
# lint cache
.eslintcache
*.cache

# styleguide build
/styleguide
54 changes: 3 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "next lint --fix",
"lint:check": "next lint"
},
"engines": {
"node": "^18"
"lint:check": "next lint",
"documentation": "styleguidist server"
},
"dependencies": {
"@babel/runtime": "^7.17.9",
"@emotion/react": "^11.8.1",
"@emotion/styled": "^11.6.0",
"@mui/icons-material": "^6.1.2",
Expand Down Expand Up @@ -61,7 +58,6 @@
"@typescript-eslint/parser": "^8.8.1",
"babel-loader": "^9.1.2",
"babel-plugin-styled-components": "^2.1.1",
"babel-polyfill": "^6.26.0",
"eslint": "^8.57.1",
"eslint-config-next": "^14.2.14",
"eslint-config-prettier": "^9.1.0",
Expand Down
73 changes: 46 additions & 27 deletions styleguide.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const path = require('path');
const webpack = require('webpack');
const dotenv = require('dotenv').config({ path: __dirname + '/.env' });

module.exports = {
pagePerSection: true,
title: 'UTD Trends Style Guide',
title: 'UTD Trends Documentation',
template: {
links: [
{
Expand All @@ -30,69 +31,87 @@ module.exports = {
name: 'Navigation Components',
components: ['./src/components/navigation/**/*.tsx'],
},
{
name: 'Dashboard Components',
components: ['./src/components/dashboard/**/*.tsx'],
},
{
name: 'Overview Components',
components: ['./src/components/overview/**/*.tsx'],
},
{
name: 'Search Components',
components: ['./src/components/search/**/*.tsx'],
},
{
name: 'Graph Components',
content: './src/components/graph/GraphProps.md',
components: ['./src/components/graph/**/*.tsx'],
},
{
name: 'Compare Components',
components: ['./src/components/compare/**/*.tsx'],
},
{
name: 'Icon Components',
components: ['./src/components/icons/**/*.tsx'],
},
],

propsParser: require('react-docgen-typescript').parse,
require: [
path.resolve(__dirname, 'styleguide/setup.js'),
path.join(__dirname, './src/styles/globals.css'),
],
require: [path.join(__dirname, './src/styles/globals.css')],
webpackConfig: {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
fallback: {
zlib: false,
stream: false,
fs: false,
},
},
plugins: [
new webpack.DefinePlugin({
'process.env': JSON.stringify(dotenv.parsed),
}),
],
module: {
rules: [
// File Loaders that are needed for your components
{
test: /\.tsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
// Other loaders that are needed for your components
{
test: /\.css$/,
test: /\.md$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [
[
'postcss-preset-env',
{
// Options
},
],
],
},
},
loader: 'html-loader',
},
{
loader: 'markdown-loader',
},
],
},
{
test: /\.md$/,
test: /\.css$/,
use: [
'style-loader',
'css-loader',
{
loader: 'html-loader',
},
{
loader: 'markdown-loader',
loader: 'postcss-loader',
},
],
},
{
test: /\.(png)$/,
type: 'asset/resource',
generator: {
filename: 'assets/[name][ext]',
},
},
],
},
},
Expand Down
2 changes: 0 additions & 2 deletions styleguide/build/229.94f6a1dc.js

This file was deleted.

13 changes: 0 additions & 13 deletions styleguide/build/229.94f6a1dc.js.LICENSE.txt

This file was deleted.

75 changes: 0 additions & 75 deletions styleguide/build/bundle.ac367162.js

This file was deleted.

116 changes: 0 additions & 116 deletions styleguide/build/bundle.ac367162.js.LICENSE.txt

This file was deleted.

13 changes: 0 additions & 13 deletions styleguide/index.html

This file was deleted.

1 change: 0 additions & 1 deletion styleguide/setup.js

This file was deleted.