@konomi-app/k2 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,6 +18,7 @@ export async function action() {
|
|
|
18
18
|
const config = await importPluginConfig();
|
|
19
19
|
if (config?.lint?.build) {
|
|
20
20
|
await lint();
|
|
21
|
+
console.log('✨ Lint success.');
|
|
21
22
|
}
|
|
22
23
|
if (!fs.existsSync(PLUGIN_CONTENTS_DIRECTORY)) {
|
|
23
24
|
await fs.mkdir(PLUGIN_CONTENTS_DIRECTORY, { recursive: true });
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { program } from 'commander';
|
|
2
|
-
import
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { DEFAULT_PORT, PLUGIN_DEVELOPMENT_DIRECTORY, PLUGIN_WORKSPACE_DIRECTORY, } from '../../lib/constants.js';
|
|
5
|
+
import { importPluginConfig } from '../../lib/import.js';
|
|
5
6
|
import base from '../dev-base-esbuild.js';
|
|
6
7
|
import { getManifest } from './create-manifest.js';
|
|
7
|
-
import { watchContentsAndUploadZip } from './upload.js';
|
|
8
8
|
import { watchCss } from './tailwind.js';
|
|
9
|
+
import { watchContentsAndUploadZip } from './upload.js';
|
|
9
10
|
export default function command() {
|
|
10
11
|
program
|
|
11
12
|
.command('dev')
|
|
@@ -18,6 +19,9 @@ export async function action(options) {
|
|
|
18
19
|
try {
|
|
19
20
|
const { ppk: ppkPath } = options;
|
|
20
21
|
const config = await importPluginConfig();
|
|
22
|
+
if (!fs.existsSync(PLUGIN_DEVELOPMENT_DIRECTORY)) {
|
|
23
|
+
await fs.mkdir(PLUGIN_DEVELOPMENT_DIRECTORY, { recursive: true });
|
|
24
|
+
}
|
|
21
25
|
const port = config.server?.port ?? DEFAULT_PORT;
|
|
22
26
|
const manifest = await getManifest({ config, port });
|
|
23
27
|
console.log(`📝 manifest.json generated`);
|