@matter/create
Advanced tools
Comparing version 0.11.0-alpha.0-20241028-f7b2f013d to 0.11.0
@@ -39,3 +39,3 @@ /** | ||
} | ||
const matterJsVersion = "latest"; | ||
const matterJsVersion = `~${await readFile(project.pkg.workspace.resolve("version.txt"), "utf-8")}`; | ||
const typescriptVersion = project.pkg.findPackage("@matter/tools").json.dependencies.typescript; | ||
@@ -42,0 +42,0 @@ const config = { |
@@ -54,3 +54,3 @@ /** | ||
bigWelcome(); | ||
notice(`Initializing project from ${bold(project.template.name)} template...`); | ||
notice(`Creating project from ${bold(project.template.name)} template...`); | ||
try { | ||
@@ -66,3 +66,3 @@ await project.create(); | ||
if (doBuild) { | ||
notice(`Building project...`); | ||
notice(`Initializing project...`); | ||
try { | ||
@@ -81,4 +81,5 @@ project.build(); | ||
} | ||
notice(`${bold("Success!")} Run your new app using ${bold("npm run app")}.`); | ||
const where = project.dest !== "." && project.dest !== process.cwd() ? ` in ${bold(project.dest)}` : ""; | ||
notice(`${bold("Success!")} Run your new app using ${bold("npm run app")}${where}.`); | ||
} | ||
//# sourceMappingURL=cli.js.map |
@@ -16,3 +16,5 @@ /** | ||
const packageJson = JSON.parse(await readFile(resolve(CREATE_DIR, "package.json"), "utf-8")); | ||
config.matterJsVersion = `^${packageJson.version}`; | ||
if (packageJson.version !== "0.0.0-git") { | ||
config.matterJsVersion = `^${packageJson.version}`; | ||
} | ||
return config; | ||
@@ -19,0 +21,0 @@ } |
@@ -24,3 +24,4 @@ /** | ||
app: "node --enable-source-maps dist/index.js", | ||
test: 'echo "Error: no test specified" && exit 1' | ||
test: 'echo "Error: no test specified" && exit 1', | ||
clean: `node -e 'fs.rmSync("dist", { recursive: true, force: true })'` | ||
} | ||
@@ -115,3 +116,3 @@ }; | ||
function build() { | ||
execSync(`npm -q install`, { stdio: "inherit", cwd: this.dest }); | ||
execSync(`npm install --silent`, { stdio: "inherit", cwd: this.dest }); | ||
} | ||
@@ -118,0 +119,0 @@ export { |
{ | ||
"matterJsVersion": "latest", | ||
"matterJsVersion": "~0.11.0", | ||
"typescriptVersion": "~5.6.2", | ||
@@ -4,0 +4,0 @@ "templates": [ |
{ | ||
"name": "@matter/create", | ||
"version": "0.11.0-alpha.0-20241028-f7b2f013d", | ||
"version": "0.11.0", | ||
"description": "Matter.js skeleton project generator", | ||
@@ -35,3 +35,3 @@ "type": "module", | ||
"devDependencies": { | ||
"@matter/tools": "0.11.0-alpha.0-20241028-f7b2f013d", | ||
"@matter/tools": "0.11.0", | ||
"@types/node": "^22.8.1", | ||
@@ -38,0 +38,0 @@ "@types/tar-stream": "^3.1.3" |
@@ -52,5 +52,5 @@ /** | ||
// We set the version after build so we don't know actual version. Juse use placeholder. We then replace with the | ||
// "create" package version on init | ||
const matterJsVersion = "latest"; | ||
// We set the version after build so we don't know actual version here. This placeholder is just used in dev. We | ||
// then replace with the "create" package version on init if it's not a git build | ||
const matterJsVersion = `~${await readFile(project.pkg.workspace.resolve("version.txt"), "utf-8")}`; | ||
@@ -57,0 +57,0 @@ const typescriptVersion = project.pkg.findPackage("@matter/tools").json.dependencies.typescript; |
@@ -67,3 +67,3 @@ /** | ||
bigWelcome(); | ||
notice(`Initializing project from ${bold(project.template.name)} template...`); | ||
notice(`Creating project from ${bold(project.template.name)} template...`); | ||
@@ -81,3 +81,3 @@ try { | ||
if (doBuild) { | ||
notice(`Building project...`); | ||
notice(`Initializing project...`); | ||
@@ -97,3 +97,5 @@ try { | ||
notice(`${bold("Success!")} Run your new app using ${bold("npm run app")}.`); | ||
const where = project.dest !== "." && project.dest !== process.cwd() ? ` in ${bold(project.dest)}` : ""; | ||
notice(`${bold("Success!")} Run your new app using ${bold("npm run app")}${where}.`); | ||
} |
@@ -33,5 +33,7 @@ /** | ||
const packageJson = JSON.parse(await readFile(resolve(CREATE_DIR, "package.json"), "utf-8")) as { version: string }; | ||
config.matterJsVersion = `^${packageJson.version}`; | ||
if (packageJson.version !== "0.0.0-git") { | ||
config.matterJsVersion = `^${packageJson.version}`; | ||
} | ||
return config; | ||
} |
@@ -27,2 +27,3 @@ /** | ||
test: 'echo "Error: no test specified" && exit 1', | ||
clean: "node -e 'fs.rmSync(\"dist\", { recursive: true, force: true })'", | ||
}, | ||
@@ -146,3 +147,3 @@ }; | ||
function build(this: NewProject) { | ||
execSync(`npm -q install`, { stdio: "inherit", cwd: this.dest }); | ||
execSync(`npm install --silent`, { stdio: "inherit", cwd: this.dest }); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
166650
3354
1