{"version":3,"file":"modernjs.cjs","sources":["../../src/plugin/modernjs.ts"],"sourcesContent":["import type { AppTools, CliPlugin } from \"@modern-js/app-tools\";\nimport { build } from \"../cli/commands/build\";\nimport { dev } from \"../cli/commands/dev\";\nimport { pluginName } from \"./index\";\n\nexport default (): CliPlugin<AppTools> => ({\n  name: pluginName,\n  setup(api) {\n    api.onBeforeBuild(async () => {\n      await build();\n    });\n    api.onBeforeDev(async () => {\n      await dev();\n    });\n  },\n});\n"],"names":["pluginName","build","dev"],"mappings":";;;;;;AAIA,eAAe,OAAO;AACtB,EAAE,IAAI,EAAEA,gBAAU;AAClB,EAAE,KAAK,CAAC,GAAG,EAAE;AACb,IAAI,GAAG,CAAC,aAAa,CAAC,YAAY;AAClC,MAAM,MAAMC,WAAK,EAAE;AACnB,IAAI,CAAC,CAAC;AACN,IAAI,GAAG,CAAC,WAAW,CAAC,YAAY;AAChC,MAAM,MAAMC,OAAG,EAAE;AACjB,IAAI,CAAC,CAAC;AACN,EAAE;AACF,CAAC,CAAC;;;;"}