Skip to content

Commit

Permalink
Added docusuaurs to workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jan 21, 2023
1 parent aa0f1a5 commit abf25c9
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 30 deletions.
10 changes: 10 additions & 0 deletions .changeset/polite-planets-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'typedoc-plugin-markdown': major
---

- Removal of handlebars.
- MDX 2 support as standard.
- Updated directory structure to follow the project module structure.
- Ability to choose which symbols should be rendered to a single doc, with the ability to add all symbols into single doc.
- Ability to choose between list/table styles.
- UI improvements.
5 changes: 5 additions & 0 deletions .changeset/twenty-moose-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'docusaurus-plugin-typedoc': minor
---

- Compatibility updates for typedoc-plugin-markdown
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Release
on: [pull_request]
on:
push:
branches:
- next-release
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
Expand All @@ -13,7 +16,7 @@ jobs:
with:
node-version: 16
- name: Install Dependencies
run: yarn
run: npm install
- name: Create Release Pull Request
uses: changesets/action@v1
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"workspaces": [
"packages/typedoc-plugin-markdown",
"packages/typedoc-plugin-markdown"
"packages/docusaurus-plugin-typedoc"
],
"scripts": {
"lint": "npm run lint --workspaces",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Plugin: (docs) should render 1`] = `
[
"_category_.yml",
"classes",
"enums",
"functions",
"index.md",
"interfaces",
"Modules.md",
"namespaces",
"variables",
]
`;

exports[`Plugin: (docs) should write category yaml 1`] = `
"label: "Classes"
position: 3"
Expand Down
12 changes: 4 additions & 8 deletions packages/docusaurus-plugin-typedoc/test/specs/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,17 @@ describe(`Plugin:`, () => {
tmpobj = tmp.dirSync();
await bootstrap(tmpobj);
});
test(`should render`, () => {
const files = fs.readdirSync(tmpobj.name + '/docs/api');
expect(files.sort((a, b) => a.localeCompare(b))).toMatchSnapshot();
});

test(`should write doc`, () => {
const sidebar = fs.readFileSync(tmpobj.name + '/docs/api/index.md');
expect(sidebar.toString()).toMatchSnapshot();
const indexDoc = fs.readFileSync(tmpobj.name + '/docs/api/index.md');
expect(indexDoc.toString()).toMatchSnapshot();
});

test(`should write category yaml`, () => {
const sidebar = fs.readFileSync(
const categoryYaml = fs.readFileSync(
tmpobj.name + '/docs/api/classes/_category_.yml',
);
expect(sidebar.toString()).toMatchSnapshot();
expect(categoryYaml.toString()).toMatchSnapshot();
});
});
});
9 changes: 4 additions & 5 deletions scripts/changesets/changelog.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const getReleaseLine = async (changeset, _type) => {
const [firstLine, ...futureLines] = changeset.summary
/*const [firstLine, ...futureLines] = changeset.summary
.split('\n')
.map((l) => l.trimRight());
let returnVal = `- ${firstLine}`;
let returnVal = `- ${firstLine}`;
if (futureLines.length > 0) {
returnVal += `\n- ${futureLines.map((l) => ` ${l}`).join('\n')}`;
}

return returnVal;
}*/
return changeset.summary;
};

const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => {
Expand Down

0 comments on commit abf25c9

Please sign in to comment.