Skip to content

Commit e98c751

Browse files
committed
console hello world with the plugin version and link
1 parent 61e894a commit e98c751

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@melonjs/debug-plugin",
33
"version": "14.7.0",
44
"description": "melonJS debug plugin",
5+
"homepage": "https://github.com/melonjs/debug-plugin#readme",
56
"type": "module",
67
"keywords": [
78
"2D",
@@ -55,6 +56,7 @@
5556
"@babel/plugin-syntax-import-assertions": "^7.22.5",
5657
"@rollup/plugin-commonjs": "^25.0.4",
5758
"@rollup/plugin-image": "^3.0.2",
59+
"@rollup/plugin-json": "^6.0.0",
5860
"@rollup/plugin-node-resolve": "^15.2.1",
5961
"@rollup/plugin-replace": "^5.0.2",
6062
"del-cli": "^5.1.0",

rollup.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import image from "@rollup/plugin-image";
44
import bundleSize from "rollup-plugin-bundle-size";
55
import commonjs from "@rollup/plugin-commonjs";
66
import resolve from "@rollup/plugin-node-resolve";
7+
import json from "@rollup/plugin-json";
78
import pkg from "./package.json" assert { type: "json" };
89

910
// credit/license information
@@ -20,6 +21,7 @@ const license = [
2021
export default [{
2122
input: "src/index.js",
2223
plugins: [
24+
json(),
2325
resolve({
2426
mainFields: ["module"],
2527
browser: true,

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { utils, plugin, input, event } from "melonjs";
2+
import { name, version, homepage, peerDependencies } from "../package.json";
23
import { DebugPanel } from "./debugPanel";
34

45
/**
@@ -36,7 +37,10 @@ export class DebugPanelPlugin extends plugin.BasePlugin {
3637
super();
3738

3839
// minimum melonJS version expected
39-
this.version = "15.2.0";
40+
this.version = peerDependencies["melonjs"];
41+
42+
// hello world
43+
console.log(`${name} ${version} | ${homepage}`);
4044

4145
this.debugToggle = debugToggle;
4246

0 commit comments

Comments
 (0)