@ereo/cli 0.1.25 → 0.1.27
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/dist/commands/create.d.ts +2 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -11
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAsB,MAAM,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EA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EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AACxH,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -353,7 +353,7 @@ async function create(projectName, options = {}) {
|
|
|
353
353
|
await mkdir(join4(projectDir, "app/components"), { recursive: true });
|
|
354
354
|
await mkdir(join4(projectDir, "app/middleware"), { recursive: true });
|
|
355
355
|
await mkdir(join4(projectDir, "public"), { recursive: true });
|
|
356
|
-
const files = generateTemplateFiles(template, typescript, projectName);
|
|
356
|
+
const files = generateTemplateFiles(template, typescript, projectName, options.version);
|
|
357
357
|
const sortedPaths = Object.keys(files).sort();
|
|
358
358
|
for (const path of sortedPaths) {
|
|
359
359
|
const content = files[path];
|
|
@@ -372,21 +372,22 @@ async function create(projectName, options = {}) {
|
|
|
372
372
|
console.log(` bun run dev
|
|
373
373
|
`);
|
|
374
374
|
}
|
|
375
|
-
function generateTemplateFiles(template, typescript, projectName) {
|
|
375
|
+
function generateTemplateFiles(template, typescript, projectName, version) {
|
|
376
376
|
const ext = typescript ? "tsx" : "jsx";
|
|
377
377
|
const files = {};
|
|
378
|
+
const ereoVersion = version ? `^${version}` : "^0.1.0";
|
|
378
379
|
const dependencies = {
|
|
379
|
-
"@ereo/core":
|
|
380
|
-
"@ereo/router":
|
|
381
|
-
"@ereo/server":
|
|
382
|
-
"@ereo/client":
|
|
383
|
-
"@ereo/data":
|
|
384
|
-
"@ereo/cli":
|
|
380
|
+
"@ereo/core": ereoVersion,
|
|
381
|
+
"@ereo/router": ereoVersion,
|
|
382
|
+
"@ereo/server": ereoVersion,
|
|
383
|
+
"@ereo/client": ereoVersion,
|
|
384
|
+
"@ereo/data": ereoVersion,
|
|
385
|
+
"@ereo/cli": ereoVersion,
|
|
385
386
|
react: "^18.2.0",
|
|
386
387
|
"react-dom": "^18.2.0"
|
|
387
388
|
};
|
|
388
389
|
if (template === "tailwind") {
|
|
389
|
-
dependencies["@ereo/plugin-tailwind"] =
|
|
390
|
+
dependencies["@ereo/plugin-tailwind"] = ereoVersion;
|
|
390
391
|
}
|
|
391
392
|
files["package.json"] = JSON.stringify({
|
|
392
393
|
name: projectName,
|
|
@@ -2083,7 +2084,9 @@ function printDbHelp() {
|
|
|
2083
2084
|
}
|
|
2084
2085
|
|
|
2085
2086
|
// src/index.ts
|
|
2086
|
-
|
|
2087
|
+
import { join as join7, dirname } from "path";
|
|
2088
|
+
var pkgJsonPath = join7(dirname(import.meta.dir), "package.json");
|
|
2089
|
+
var VERSION = (await Bun.file(pkgJsonPath).json()).version;
|
|
2087
2090
|
function printHelp() {
|
|
2088
2091
|
console.log(`
|
|
2089
2092
|
\x1B[36m\u2B21\x1B[0m \x1B[1mEreo\x1B[0m - React Fullstack Framework
|
|
@@ -2223,7 +2226,8 @@ async function main() {
|
|
|
2223
2226
|
}
|
|
2224
2227
|
const createOptions = {
|
|
2225
2228
|
template: options.template || options.t,
|
|
2226
|
-
typescript: options.typescript !== "false"
|
|
2229
|
+
typescript: options.typescript !== "false",
|
|
2230
|
+
version: VERSION
|
|
2227
2231
|
};
|
|
2228
2232
|
await create(projectName, createOptions);
|
|
2229
2233
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ereo/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Ereo Team",
|
|
6
6
|
"homepage": "https://ereo.dev",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"typecheck": "tsc --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ereo/core": "^0.1.
|
|
39
|
-
"@ereo/router": "^0.1.
|
|
40
|
-
"@ereo/server": "^0.1.
|
|
41
|
-
"@ereo/bundler": "^0.1.
|
|
38
|
+
"@ereo/core": "^0.1.27",
|
|
39
|
+
"@ereo/router": "^0.1.27",
|
|
40
|
+
"@ereo/server": "^0.1.27",
|
|
41
|
+
"@ereo/bundler": "^0.1.27"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/bun": "^1.1.0",
|