Skip to content

Commit

Permalink
Update package
Browse files Browse the repository at this point in the history
  • Loading branch information
jlvandenhout committed Feb 25, 2022
1 parent 2dbb054 commit ffbdb30
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 64 deletions.
2 changes: 0 additions & 2 deletions .env.example

This file was deleted.

10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
# Generated files
.docusaurus
.cache-loader
.eslintcache

# Misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand All @@ -20,11 +18,3 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
12 changes: 1 addition & 11 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const lightCodeTheme = require('prism-react-renderer/themes/github');
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand All @@ -20,15 +18,7 @@ const config = {
favicon: 'img/favicon.ico',
organizationName: 'jlvandenhout', // Usually your GitHub org/user name.
projectName: 'docusaurus-plugin-docs-editor-preview', // Usually your repo name.
plugins: [
[
path.resolve(__dirname, './../lib'),
{
authorizationClientId: process.env.AUTHORIZATION_CLIENT_ID,
authorizationTokenUrl: process.env.AUTHORIZATION_TOKEN_URL,
},
],
],

presets: [
[
'classic',
Expand Down
36 changes: 9 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
{
"name": "preview",
"name": "website",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "env-cmd docusaurus start",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"check": "prettier --check . && eslint --cache . && tsc",
"fix": "prettier --write . && eslint --cache --fix .",
"postinstall": "husky install"
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.15",
"@docusaurus/preset-classic": "2.0.0-beta.15",
"@mdx-js/react": "^1.6.21",
"@docusaurus/core": "2.0.0-beta.16",
"@docusaurus/preset-classic": "2.0.0-beta.16",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.15",
"@docusaurus/module-type-aliases": "2.0.0-beta.16",
"@tsconfig/docusaurus": "^1.0.4",
"@types/eslint": "^8",
"@types/prettier": "^2",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"env-cmd": "^10.1.0",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "^7.28.0",
"husky": ">=6",
"lint-staged": ">=10",
"prettier": "^2.5.1",
"typescript": "^4.5.2"
},
"browserslist": {
Expand All @@ -52,10 +39,5 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"packageManager": "yarn@3.1.1",
"lint-staged": {
"*.{js,jsx,ts,tsx,css,less,md,mdx,json}": "prettier --write",
"*.{js,jsx,ts,tsx}": "eslint --cache --fix"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import useBaseUrl from '@docusaurus/useBaseUrl';
import React from 'react';
import clsx from 'clsx';
import styles from './HomepageFeatures.module.css';
import styles from './styles.module.css';

type FeatureItem = {
title: string;
Expand All @@ -12,7 +11,7 @@ type FeatureItem = {
const FeatureList: FeatureItem[] = [
{
title: 'Easy to Use',
image: '/img/undraw_docusaurus_mountain.svg',
image: require('@site/src/static/img/undraw_docusaurus_mountain.svg'),
description: (
<>
Docusaurus was designed from the ground up to be easily installed and
Expand All @@ -22,7 +21,7 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Focus on What Matters',
image: '/img/undraw_docusaurus_tree.svg',
image: require('@site/src/static/img/undraw_docusaurus_tree.svg'),
description: (
<>
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
Expand All @@ -32,7 +31,7 @@ const FeatureList: FeatureItem[] = [
},
{
title: 'Powered by React',
image: '/img/undraw_docusaurus_react.svg',
image: require('@site/src/static/img/undraw_docusaurus_react.svg'),
description: (
<>
Extend or customize your website layout by reusing React. Docusaurus can
Expand All @@ -46,11 +45,7 @@ function Feature({ title, image, description }: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className='text--center'>
<img
className={styles.featureSvg}
alt={title}
src={useBaseUrl(image)}
/>
<img className={styles.featureSvg} alt={title} src={image} />
</div>
<div className='text--center padding-horiz--md'>
<h3>{title}</h3>
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
html[data-theme='dark'] {
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
Expand All @@ -34,6 +34,6 @@ html[data-theme='dark'] {
padding: 0 var(--ifm-pre-padding);
}

html[data-theme='dark'] .docusaurus-highlight-code-line {
[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
}
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import styles from './index.module.css';
import HomepageFeatures from '../components/HomepageFeatures';
import HomepageFeatures from '@site/src/components/HomepageFeatures';

function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"noEmit": true
"baseUrl": "."
}
}

0 comments on commit ffbdb30

Please sign in to comment.