@nasti-toolchain/nasti 1.4.0 → 1.4.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.
- package/README.md +5 -5
- package/dist/cli.cjs +5 -5
- package/dist/cli.js +5 -5
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*兼容 Vite 插件生态,内置 React & Vue 支持*
|
|
8
8
|
|
|
9
9
|
[](https://github.com/zixiao-labs/Nasti/actions/workflows/ci.yml)
|
|
10
|
-
[](https://www.npmjs.com/package/@nasti-toolchain/nasti)
|
|
11
11
|
[](./LICENSE)
|
|
12
12
|
|
|
13
13
|
[English](#features) | [文档](https://nasti.zixiaolabs.com) | [快速开始](#quick-start)
|
|
@@ -58,7 +58,7 @@ my-project/
|
|
|
58
58
|
|
|
59
59
|
```ts
|
|
60
60
|
// nasti.config.ts
|
|
61
|
-
import { defineConfig } from 'nasti-
|
|
61
|
+
import { defineConfig } from '@nasti-toolchain/nasti'
|
|
62
62
|
|
|
63
63
|
export default defineConfig({
|
|
64
64
|
// 框架: 'react' | 'vue' | 'auto'(自动检测)
|
|
@@ -109,7 +109,7 @@ nasti electron-build [root] [--outDir dist]
|
|
|
109
109
|
## Programmatic API
|
|
110
110
|
|
|
111
111
|
```ts
|
|
112
|
-
import { build, createServer, defineConfig } from 'nasti-
|
|
112
|
+
import { build, createServer, defineConfig } from '@nasti-toolchain/nasti'
|
|
113
113
|
|
|
114
114
|
// 开发服务器
|
|
115
115
|
const server = await createServer({
|
|
@@ -130,7 +130,7 @@ await build({
|
|
|
130
130
|
Nasti 的插件接口与 Vite 完全兼容:
|
|
131
131
|
|
|
132
132
|
```ts
|
|
133
|
-
import type { NastiPlugin } from 'nasti-
|
|
133
|
+
import type { NastiPlugin } from '@nasti-toolchain/nasti'
|
|
134
134
|
|
|
135
135
|
function myPlugin(): NastiPlugin {
|
|
136
136
|
return {
|
|
@@ -180,7 +180,7 @@ npm install -D electron@^41
|
|
|
180
180
|
|
|
181
181
|
```ts
|
|
182
182
|
// nasti.config.ts
|
|
183
|
-
import { defineConfig } from 'nasti-
|
|
183
|
+
import { defineConfig } from '@nasti-toolchain/nasti'
|
|
184
184
|
|
|
185
185
|
export default defineConfig({
|
|
186
186
|
target: 'electron',
|
package/dist/cli.cjs
CHANGED
|
@@ -1464,7 +1464,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
1464
1464
|
const localUrl = `http://localhost:${actualPort}`;
|
|
1465
1465
|
const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
|
|
1466
1466
|
console.log();
|
|
1467
|
-
console.log(import_picocolors.default.cyan(" nasti dev server") + import_picocolors.default.dim(` v${"1.4.
|
|
1467
|
+
console.log(import_picocolors.default.cyan(" nasti dev server") + import_picocolors.default.dim(` v${"1.4.1"}`));
|
|
1468
1468
|
console.log();
|
|
1469
1469
|
console.log(` ${import_picocolors.default.green(">")} Local: ${import_picocolors.default.cyan(localUrl)}`);
|
|
1470
1470
|
if (networkUrl) {
|
|
@@ -1581,7 +1581,7 @@ __export(build_exports, {
|
|
|
1581
1581
|
async function build(inlineConfig = {}) {
|
|
1582
1582
|
const config = await resolveConfig(inlineConfig, "build");
|
|
1583
1583
|
const startTime = performance.now();
|
|
1584
|
-
console.log(import_picocolors2.default.cyan("\n\u{1F528} nasti build") + import_picocolors2.default.dim(` v${"1.4.
|
|
1584
|
+
console.log(import_picocolors2.default.cyan("\n\u{1F528} nasti build") + import_picocolors2.default.dim(` v${"1.4.1"}`));
|
|
1585
1585
|
console.log(import_picocolors2.default.dim(` root: ${config.root}`));
|
|
1586
1586
|
console.log(import_picocolors2.default.dim(` mode: ${config.mode}`));
|
|
1587
1587
|
const outDir = import_node_path10.default.resolve(config.root, config.build.outDir);
|
|
@@ -1742,7 +1742,7 @@ async function buildElectron(inlineConfig = {}) {
|
|
|
1742
1742
|
const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
|
|
1743
1743
|
const startTime = performance.now();
|
|
1744
1744
|
assertElectronVersion(config);
|
|
1745
|
-
console.log(import_picocolors3.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors3.default.dim(` v${"1.4.
|
|
1745
|
+
console.log(import_picocolors3.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors3.default.dim(` v${"1.4.1"}`));
|
|
1746
1746
|
console.log(import_picocolors3.default.dim(` root: ${config.root}`));
|
|
1747
1747
|
console.log(import_picocolors3.default.dim(` mode: ${config.mode}`));
|
|
1748
1748
|
console.log(import_picocolors3.default.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
|
|
@@ -1894,7 +1894,7 @@ async function startElectronDev(inlineConfig = {}) {
|
|
|
1894
1894
|
const { noSpawn, ...rest } = inlineConfig;
|
|
1895
1895
|
const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
|
|
1896
1896
|
warnElectronVersion(config);
|
|
1897
|
-
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.4.
|
|
1897
|
+
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.4.1"}`));
|
|
1898
1898
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|
|
1899
1899
|
const server = await createServer2({ ...rest, target: "electron" });
|
|
1900
1900
|
await server.listen();
|
|
@@ -2210,6 +2210,6 @@ cli.command("preview [root]", "Preview production build").option("--port <port>"
|
|
|
2210
2210
|
}
|
|
2211
2211
|
});
|
|
2212
2212
|
cli.help();
|
|
2213
|
-
cli.version("1.4.
|
|
2213
|
+
cli.version("1.4.1");
|
|
2214
2214
|
cli.parse();
|
|
2215
2215
|
//# sourceMappingURL=cli.cjs.map
|
package/dist/cli.js
CHANGED
|
@@ -1444,7 +1444,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
1444
1444
|
const localUrl = `http://localhost:${actualPort}`;
|
|
1445
1445
|
const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
|
|
1446
1446
|
console.log();
|
|
1447
|
-
console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.4.
|
|
1447
|
+
console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.4.1"}`));
|
|
1448
1448
|
console.log();
|
|
1449
1449
|
console.log(` ${pc.green(">")} Local: ${pc.cyan(localUrl)}`);
|
|
1450
1450
|
if (networkUrl) {
|
|
@@ -1557,7 +1557,7 @@ import pc2 from "picocolors";
|
|
|
1557
1557
|
async function build(inlineConfig = {}) {
|
|
1558
1558
|
const config = await resolveConfig(inlineConfig, "build");
|
|
1559
1559
|
const startTime = performance.now();
|
|
1560
|
-
console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.4.
|
|
1560
|
+
console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.4.1"}`));
|
|
1561
1561
|
console.log(pc2.dim(` root: ${config.root}`));
|
|
1562
1562
|
console.log(pc2.dim(` mode: ${config.mode}`));
|
|
1563
1563
|
const outDir = path10.resolve(config.root, config.build.outDir);
|
|
@@ -1717,7 +1717,7 @@ async function buildElectron(inlineConfig = {}) {
|
|
|
1717
1717
|
const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
|
|
1718
1718
|
const startTime = performance.now();
|
|
1719
1719
|
assertElectronVersion(config);
|
|
1720
|
-
console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.4.
|
|
1720
|
+
console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.4.1"}`));
|
|
1721
1721
|
console.log(pc3.dim(` root: ${config.root}`));
|
|
1722
1722
|
console.log(pc3.dim(` mode: ${config.mode}`));
|
|
1723
1723
|
console.log(pc3.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
|
|
@@ -1871,7 +1871,7 @@ async function startElectronDev(inlineConfig = {}) {
|
|
|
1871
1871
|
const { noSpawn, ...rest } = inlineConfig;
|
|
1872
1872
|
const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
|
|
1873
1873
|
warnElectronVersion(config);
|
|
1874
|
-
console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.4.
|
|
1874
|
+
console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.4.1"}`));
|
|
1875
1875
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|
|
1876
1876
|
const server = await createServer2({ ...rest, target: "electron" });
|
|
1877
1877
|
await server.listen();
|
|
@@ -2179,6 +2179,6 @@ cli.command("preview [root]", "Preview production build").option("--port <port>"
|
|
|
2179
2179
|
}
|
|
2180
2180
|
});
|
|
2181
2181
|
cli.help();
|
|
2182
|
-
cli.version("1.4.
|
|
2182
|
+
cli.version("1.4.1");
|
|
2183
2183
|
cli.parse();
|
|
2184
2184
|
//# sourceMappingURL=cli.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -723,7 +723,7 @@ __export(build_exports, {
|
|
|
723
723
|
async function build(inlineConfig = {}) {
|
|
724
724
|
const config = await resolveConfig(inlineConfig, "build");
|
|
725
725
|
const startTime = performance.now();
|
|
726
|
-
console.log(import_picocolors.default.cyan("\n\u{1F528} nasti build") + import_picocolors.default.dim(` v${"1.4.
|
|
726
|
+
console.log(import_picocolors.default.cyan("\n\u{1F528} nasti build") + import_picocolors.default.dim(` v${"1.4.1"}`));
|
|
727
727
|
console.log(import_picocolors.default.dim(` root: ${config.root}`));
|
|
728
728
|
console.log(import_picocolors.default.dim(` mode: ${config.mode}`));
|
|
729
729
|
const outDir = import_node_path7.default.resolve(config.root, config.build.outDir);
|
|
@@ -1626,7 +1626,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
1626
1626
|
const localUrl = `http://localhost:${actualPort}`;
|
|
1627
1627
|
const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
|
|
1628
1628
|
console.log();
|
|
1629
|
-
console.log(import_picocolors3.default.cyan(" nasti dev server") + import_picocolors3.default.dim(` v${"1.4.
|
|
1629
|
+
console.log(import_picocolors3.default.cyan(" nasti dev server") + import_picocolors3.default.dim(` v${"1.4.1"}`));
|
|
1630
1630
|
console.log();
|
|
1631
1631
|
console.log(` ${import_picocolors3.default.green(">")} Local: ${import_picocolors3.default.cyan(localUrl)}`);
|
|
1632
1632
|
if (networkUrl) {
|
|
@@ -1759,7 +1759,7 @@ async function buildElectron(inlineConfig = {}) {
|
|
|
1759
1759
|
const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
|
|
1760
1760
|
const startTime = performance.now();
|
|
1761
1761
|
assertElectronVersion(config);
|
|
1762
|
-
console.log(import_picocolors2.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors2.default.dim(` v${"1.4.
|
|
1762
|
+
console.log(import_picocolors2.default.cyan("\n\u26A1 nasti build (electron)") + import_picocolors2.default.dim(` v${"1.4.1"}`));
|
|
1763
1763
|
console.log(import_picocolors2.default.dim(` root: ${config.root}`));
|
|
1764
1764
|
console.log(import_picocolors2.default.dim(` mode: ${config.mode}`));
|
|
1765
1765
|
console.log(import_picocolors2.default.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
|
|
@@ -1906,7 +1906,7 @@ async function startElectronDev(inlineConfig = {}) {
|
|
|
1906
1906
|
const { noSpawn, ...rest } = inlineConfig;
|
|
1907
1907
|
const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
|
|
1908
1908
|
warnElectronVersion(config);
|
|
1909
|
-
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.4.
|
|
1909
|
+
console.log(import_picocolors4.default.cyan("\n\u26A1 nasti electron dev") + import_picocolors4.default.dim(` v${"1.4.1"}`));
|
|
1910
1910
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|
|
1911
1911
|
const server = await createServer2({ ...rest, target: "electron" });
|
|
1912
1912
|
await server.listen();
|
package/dist/index.js
CHANGED
|
@@ -701,7 +701,7 @@ import pc from "picocolors";
|
|
|
701
701
|
async function build(inlineConfig = {}) {
|
|
702
702
|
const config = await resolveConfig(inlineConfig, "build");
|
|
703
703
|
const startTime = performance.now();
|
|
704
|
-
console.log(pc.cyan("\n\u{1F528} nasti build") + pc.dim(` v${"1.4.
|
|
704
|
+
console.log(pc.cyan("\n\u{1F528} nasti build") + pc.dim(` v${"1.4.1"}`));
|
|
705
705
|
console.log(pc.dim(` root: ${config.root}`));
|
|
706
706
|
console.log(pc.dim(` mode: ${config.mode}`));
|
|
707
707
|
const outDir = path7.resolve(config.root, config.build.outDir);
|
|
@@ -1604,7 +1604,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
1604
1604
|
const localUrl = `http://localhost:${actualPort}`;
|
|
1605
1605
|
const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
|
|
1606
1606
|
console.log();
|
|
1607
|
-
console.log(pc3.cyan(" nasti dev server") + pc3.dim(` v${"1.4.
|
|
1607
|
+
console.log(pc3.cyan(" nasti dev server") + pc3.dim(` v${"1.4.1"}`));
|
|
1608
1608
|
console.log();
|
|
1609
1609
|
console.log(` ${pc3.green(">")} Local: ${pc3.cyan(localUrl)}`);
|
|
1610
1610
|
if (networkUrl) {
|
|
@@ -1718,7 +1718,7 @@ async function buildElectron(inlineConfig = {}) {
|
|
|
1718
1718
|
const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
|
|
1719
1719
|
const startTime = performance.now();
|
|
1720
1720
|
assertElectronVersion(config);
|
|
1721
|
-
console.log(pc2.cyan("\n\u26A1 nasti build (electron)") + pc2.dim(` v${"1.4.
|
|
1721
|
+
console.log(pc2.cyan("\n\u26A1 nasti build (electron)") + pc2.dim(` v${"1.4.1"}`));
|
|
1722
1722
|
console.log(pc2.dim(` root: ${config.root}`));
|
|
1723
1723
|
console.log(pc2.dim(` mode: ${config.mode}`));
|
|
1724
1724
|
console.log(pc2.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
|
|
@@ -1865,7 +1865,7 @@ async function startElectronDev(inlineConfig = {}) {
|
|
|
1865
1865
|
const { noSpawn, ...rest } = inlineConfig;
|
|
1866
1866
|
const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
|
|
1867
1867
|
warnElectronVersion(config);
|
|
1868
|
-
console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.4.
|
|
1868
|
+
console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.4.1"}`));
|
|
1869
1869
|
const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
|
|
1870
1870
|
const server = await createServer2({ ...rest, target: "electron" });
|
|
1871
1871
|
await server.listen();
|