Skip to content

Commit

Permalink
chore: cut a release
Browse files Browse the repository at this point in the history
  • Loading branch information
daKmoR committed Jan 2, 2021
1 parent 6c2bdec commit b9a6274
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 20 deletions.
9 changes: 9 additions & 0 deletions .changeset/lovely-shirts-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@mdjs/core': minor
---

Use new dependency [plugins-manager](https://www.npmjs.com/package/plugins-manager) to add, remove or adjust plugins.

Removals:
- Removed own add plugin helper again
- Removed deprecated export of `mdjsProcessPlugins` please us `setupPlugins` option instead
20 changes: 20 additions & 0 deletions .changeset/mean-birds-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@d4kmor/eleventy-plugin-mdjs-unified': minor
'@d4kmor/blog': minor
'@d4kmor/building-rollup': minor
'@d4kmor/cli': minor
'@d4kmor/core': minor
'@d4kmor/drawer': minor
'@d4kmor/eleventy-rocket-nav': minor
'@d4kmor/launch': minor
'@d4kmor/navigation': minor
'@d4kmor/search': minor
---

Prepare release before moving npm scope and repo.

- Have building-rollup as a dedicated package
- Serve dev output as server root
- Rename `themes` to `presets`
- Move eleventy settings in to dedicated eleventy plugins
- Introduce `setup-*` function which can be used to add, remove and adjust plugins for all systems
5 changes: 5 additions & 0 deletions .changeset/proud-turkeys-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'plugins-manager': minor
---

First initial release
5 changes: 5 additions & 0 deletions .changeset/quick-cameras-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@d4kmor/building-rollup': minor
---

First initial release
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,24 @@ function adjustLinks(pluginOptions) {
const elementVisitor = node => {
if (node.tagName === 'a') {
const fullHref = node.properties && node.properties.href ? node.properties.href : undefined;
const [href, anchor] = fullHref.split('#');
const suffix = anchor ? `#${anchor}` : '';
const { inputPath } = pluginOptions.page;

if (isInternalLink(href) && href.endsWith('.md')) {
if (href.endsWith('index.md')) {
node.properties.href = `${href.substring(0, href.lastIndexOf('/') + 1)}${suffix}`;
} else {
node.properties.href = `${href.substring(0, href.length - 3)}/${suffix}`;
}

if (inputPath.endsWith('.md')) {
if (inputPath.endsWith('index.md')) {
// nothing
if (fullHref) {
const [href, anchor] = fullHref.split('#');
const suffix = anchor ? `#${anchor}` : '';
const { inputPath } = pluginOptions.page;

if (isInternalLink(href) && href.endsWith('.md')) {
if (href.endsWith('index.md')) {
node.properties.href = `${href.substring(0, href.lastIndexOf('/') + 1)}${suffix}`;
} else {
node.properties.href = `../${node.properties.href}`;
node.properties.href = `${href.substring(0, href.length - 3)}/${suffix}`;
}

if (inputPath.endsWith('.md')) {
if (inputPath.endsWith('index.md')) {
// nothing
} else {
node.properties.href = `../${node.properties.href}`;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mdjs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/open-wc/open-wc.git",
"url": "https://github.com/daKmoR/rocket.git",
"directory": "packages/mdjs-core"
},
"author": "Modern Web <[email protected]> (https://modern-web.dev/)",
Expand Down
3 changes: 0 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
{
"path": "./packages/eleventy-rocket-nav/tsconfig.json"
},
{
"path": "./packages/cli/tsconfig.json"
},
{
"path": "./packages/drawer/tsconfig.json"
},
Expand Down
2 changes: 1 addition & 1 deletion workspace-packages.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const packages = [
{ name: 'cli', type: 'js', environment: 'node-esm' },
// { name: 'cli', type: 'js', environment: 'node-esm' },
{ name: 'plugins-manager', type: 'js', environment: 'node-esm' },
{ name: 'core', type: 'js', environment: 'node' },
{ name: 'eleventy-plugin-mdjs-unified', type: 'js', environment: 'node' },
Expand Down

0 comments on commit b9a6274

Please sign in to comment.