Skip to content

Commit 8cbc698

Browse files
committed
Use my packing utility to build plugin
1 parent 19b0fe4 commit 8cbc698

File tree

6 files changed

+353
-43
lines changed

6 files changed

+353
-43
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = {
77
'airbnb',
88
'plugin:react/recommended',
99
'plugin:@typescript-eslint/recommended',
10+
'plugin:eslint-comments/recommended',
1011
],
1112
globals: {
1213
Atomics: 'readonly',
@@ -20,7 +21,7 @@ module.exports = {
2021
ecmaVersion: 2018,
2122
sourceType: 'module',
2223
},
23-
plugins: ['react', 'react-hooks', '@typescript-eslint'],
24+
plugins: ['react', 'react-hooks', '@typescript-eslint', 'eslint-comments'],
2425
rules: {
2526
// Allow JSX appearance in files with these extensions
2627
'react/jsx-filename-extension': [

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@
5050
"@typescript-eslint/parser": "4.31.0",
5151
"eslint": "7.32.0",
5252
"eslint-config-airbnb": "18.2.1",
53+
"eslint-plugin-eslint-comments": "^3.2.0",
5354
"eslint-plugin-import": "2.24.2",
5455
"eslint-plugin-jsx-a11y": "6.4.1",
5556
"eslint-plugin-react": "7.25.1",
5657
"eslint-plugin-react-hooks": "4.2.0",
5758
"husky": "7.0.2",
5859
"lint-staged": "11.1.2",
5960
"prettier": "2.4.0",
60-
"typescript": "4.4.2"
61+
"typescript": "4.4.3"
6162
},
6263
"lint-staged": {
6364
"*.{js,jsx,ts,tsx}": [

plugins/docusaurus-plugin-alumni/copyUntypedFiles.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

plugins/docusaurus-plugin-alumni/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
"main": "lib/index.js",
66
"types": "src/types.d.ts",
77
"scripts": {
8-
"build": "tsc && node copyUntypedFiles.js",
9-
"watch": "node copyUntypedFiles.js && tsc --watch",
8+
"build": "docusaurus-plugin build --theme-dir theme",
9+
"watch": "tsc --watch",
1010
"postinstall": "yarn build"
1111
},
1212
"dependencies": {
1313
"@docusaurus/utils": "2.0.0-beta.6",
1414
"@docusaurus/utils-validation": "2.0.0-beta.6",
15+
"@joshcena/docusaurus-plugin-utils": "0.0.1",
1516
"fs-extra": "10.0.0",
1617
"js-yaml": "4.1.0"
1718
},
1819
"devDependencies": {
1920
"@docusaurus/module-type-aliases": "2.0.0-beta.6",
20-
"typescript": "4.4.2"
21+
"typescript": "4.4.3"
2122
},
2223
"peerDependencies": {
2324
"react": "17.x"

plugins/docusaurus-plugin-alumni/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export default function pluginAlumni(context: LoadContext): Plugin<AlumniData> {
2525
return {
2626
name: 'docusaurus-plugin-alumni',
2727
getThemePath() {
28-
return path.resolve(__dirname, './theme');
28+
return path.resolve(__dirname, 'js-theme');
29+
},
30+
getTypeScriptThemePath() {
31+
return path.resolve(__dirname, '..', 'src', 'theme');
2932
},
3033
async loadContent() {
3134
const contentPaths = {

0 commit comments

Comments
 (0)