Skip to content

Commit 2ee8db3

Browse files
committed
docs: start working on a "clean" plugin example based on @qui-cli/create-plugin
1 parent 6646606 commit 2ee8db3

17 files changed

Lines changed: 147 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist/
2+
/node_modules/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.*
2+
/src/
3+
/tsconfig.json
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# @examples/plugin-consumer
2+
3+
A Node module that provides a distributable command that uses the plugin
4+
5+
[![npm version](https://badge.fury.io/js/@examples%2fplugin-consumer.svg)](https://npmjs.com/package/@examples/plugin-consumer)
6+
[![Module type: ESM](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://nodejs.org/api/esm.html)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env node
2+
3+
import '../dist/index.js';
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "@examples/plugin-consumer",
3+
"version": "0.0.0",
4+
"private": true,
5+
"description": "A Node module that provides a distributable command that uses the plugin",
6+
"homepage": "https://github.com/battis/qui-cli/tree/main/examples/02%20Reusable%20Plugin/Plugin%20Consumer#readme",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/battis/qui-cli.git",
10+
"directory": "examples/02 Reusable Plugin/Plugin Consumer"
11+
},
12+
"author": {
13+
"name": "Seth Battis",
14+
"url": "https://github.com/battis"
15+
},
16+
"type": "module",
17+
"directories": {
18+
"bin": "./bin"
19+
},
20+
"scripts": {
21+
"clean": "del ./dist",
22+
"build": "run-s build:*",
23+
"build:clean": "run-s clean",
24+
"build:compile": "tsc"
25+
},
26+
"dependencies": {
27+
"@qui-cli/core": "workspace:*",
28+
"@qui-cli/plugin": "workspace:*"
29+
},
30+
"devDependencies": {
31+
"@tsconfig/node-lts": "^24.0.0",
32+
"@types/node": "^24.13.2",
33+
"del-cli": "^7.0.0",
34+
"npm-run-all": "^4.1.5",
35+
"typescript": "^5.9.3"
36+
}
37+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as Plugin from "@qui-cli/plugin";
2+
3+
export type Configuration = Plugin.Configuration & {};
4+
5+
export const name = "plugin-consumer";
6+
7+
export async function run() {}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { Core } from "@qui-cli/core";
2+
import { register } from "@qui-cli/plugin";
3+
import * as PluginConsumer from "./PluginConsumer.js";
4+
5+
await register(PluginConsumer);
6+
await Core.run();
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "@tsconfig/node-lts/tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "./src",
5+
"outDir": "./dist",
6+
"types": ["node"]
7+
},
8+
"include": ["./src"]
9+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist/
2+
/node_modules/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.*
2+
/src/
3+
/tsconfig.json

0 commit comments

Comments
 (0)