docusaurus-plugin-module-alias
Advanced tools
Comparing version 0.0.2 to 0.1.0-next.1
{ | ||
"name": "docusaurus-plugin-module-alias", | ||
"version": "0.1.0-next.1", | ||
"description": "A tiny docusaurus 2 plugin for easy module alias creation", | ||
"version": "0.0.2", | ||
"license": "MIT", | ||
"files": [ | ||
"dist-*/", | ||
"bin/" | ||
], | ||
"pika": true, | ||
"sideEffects": false, | ||
"keywords": [ | ||
@@ -21,28 +14,46 @@ "docusaurus", | ||
"repository": { | ||
"url": "https://github.com/atomicpages/docusaurus-plugin-module-alias", | ||
"type": "git" | ||
"type": "git", | ||
"url": "https://github.com/atomicpages/docusaurus-plugin-module-alias" | ||
}, | ||
"license": "MIT", | ||
"author": "Dennis Thompson", | ||
"main": "./dist/cjs/index.js", | ||
"module": "./dist/esm/index.js", | ||
"types": "./dist/esm/index.d.ts", | ||
"scripts": { | ||
"test": "vitest run", | ||
"lint": "eslint 'src/index.{ts,js,tsx}'", | ||
"prebuild": "rm -rf dist", | ||
"build": "npm-run-all -p build:*", | ||
"prepare": "is-ci || husky install", | ||
"build:esm": "esbuild --sourcemap --format=esm --target=es2019 --outdir=dist/esm ./src/index.ts", | ||
"build:cjs": "esbuild --sourcemap --format=cjs --target=es2017 --outdir=dist/cjs ./src/index.ts", | ||
"build:types": "tsc -p tsconfig.build.json" | ||
}, | ||
"dependencies": { | ||
"joi": "^17.3.0" | ||
"superstruct": "^1.0.3" | ||
}, | ||
"devDependencies": { | ||
"@djthoms/eslint-config": "^3.0.0", | ||
"@djthoms/prettier-config": "^2.0.0", | ||
"@docusaurus/types": "^2.0.0-alpha.68", | ||
"@pika/pack": "^0.5.0", | ||
"@pika/plugin-build-node": "^0.9.2", | ||
"@pika/plugin-ts-standard-pkg": "^0.9.2", | ||
"eslint": "^7.14.0", | ||
"prettier": "^2.2.0", | ||
"typescript": "^4.1.2" | ||
"@commitlint/cli": "^18.4.1", | ||
"@commitlint/config-conventional": "^18.4.0", | ||
"@djthoms/eslint-config": "^6.1.1", | ||
"@djthoms/prettier-config": "^4.3.0", | ||
"@docusaurus/types": "^3.0.0", | ||
"@semantic-release/changelog": "^6.0.3", | ||
"@semantic-release/git": "^10.0.1", | ||
"@types/node": "^20.9.0", | ||
"@vitest/coverage-v8": "^0.34.6", | ||
"esbuild": "^0.19.5", | ||
"husky": "^8.0.3", | ||
"is-ci": "^3.0.1", | ||
"lint-staged": "^15.1.0", | ||
"npm-run-all": "^4.1.5", | ||
"semantic-release": "^22.0.7", | ||
"typescript": "^5.2.2", | ||
"vitest": "^0.34.6", | ||
"webpack-merge": "^5.10.0" | ||
}, | ||
"engines": { | ||
"node": ">=6.4.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"source": "dist-src/index.js", | ||
"types": "dist-types/index.d.ts", | ||
"main": "dist-node/index.js" | ||
} | ||
} |
@@ -14,23 +14,25 @@ # Docusaurus Plugin Module Alias | ||
Docusaurus 2.x uses webpack to build SSR and client bundles. Creating a plugin to add a module alias for every new docusaurus site can be easily modularized. | ||
Docusaurus 2.x uses webpack to build SSR and client bundles. Creating a plugin | ||
to add a module alias for every new docusaurus site can be easily modularized. | ||
## Usage | ||
Inside your `docusaurus.config.js` add to the `plugins` field and configure with the `alias` option :+1: | ||
Inside your `docusaurus.config.js` add to the `plugins` field and configure with | ||
the `alias` option :+1: | ||
```js | ||
const path = require('path'); | ||
const path = require("path"); | ||
module.exports = { | ||
// ... | ||
plugins: [ | ||
[ | ||
'docusaurus-plugin-module-alias', | ||
{ | ||
alias: { | ||
'@local/component': path.resolve(__dirname, '../src/index.js'), | ||
}, | ||
}, | ||
], | ||
// ... | ||
plugins: [ | ||
[ | ||
"docusaurus-plugin-module-alias", | ||
{ | ||
alias: { | ||
"@local/component": path.resolve(__dirname, "../src/index.js"), | ||
}, | ||
}, | ||
], | ||
], | ||
}; | ||
@@ -41,3 +43,4 @@ ``` | ||
Docusaurus has special aliases that shouldn't be overridden: `@site`, `@generated`, `@docusaurus`, `~docs`, `~blog`, `~pages`, `~debug` | ||
Docusaurus has special aliases that shouldn't be overridden: `@site`, | ||
`@generated`, `@docusaurus`, `~docs`, `~blog`, `~pages`, `~debug` | ||
@@ -44,0 +47,0 @@ ## Options |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
11083
19
204
1
51
18
1
+ Addedsuperstruct@^1.0.3
+ Addedsuperstruct@1.0.4(transitive)
- Removedjoi@^17.3.0
- Removed@hapi/hoek@9.3.0(transitive)
- Removed@hapi/topo@5.1.0(transitive)
- Removed@sideway/address@4.1.5(transitive)
- Removed@sideway/formula@3.0.1(transitive)
- Removed@sideway/pinpoint@2.0.0(transitive)
- Removedjoi@17.13.3(transitive)