aztomiq 1.0.4 → 1.0.6
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/bin/aztomiq.js +12 -0
- package/package.json +1 -1
- package/scripts/builds/pages.js +1 -1
package/bin/aztomiq.js
CHANGED
|
@@ -338,6 +338,18 @@ status: active
|
|
|
338
338
|
`;
|
|
339
339
|
await fs.writeFile(path.join(projectPath, 'src/features/hello-world/index.ejs'), toolEjs);
|
|
340
340
|
|
|
341
|
+
const helloEn = `hello-world:\n title: "Hello World"\n`;
|
|
342
|
+
const helloVi = `hello-world:\n title: "Xin chào"\n`;
|
|
343
|
+
await fs.writeFile(path.join(projectPath, 'src/features/hello-world/locales/en.yaml'), helloEn);
|
|
344
|
+
await fs.writeFile(path.join(projectPath, 'src/features/hello-world/locales/vi.yaml'), helloVi);
|
|
345
|
+
|
|
346
|
+
// 5. Create basic home page
|
|
347
|
+
const indexEjs = `<h1>Welcome to <%= site.title %></h1>
|
|
348
|
+
<p>Start by editing <code>src/pages/index.ejs</code> or creating new tools in <code>src/features/</code>.</p>
|
|
349
|
+
<p>Check out our sample tool: <a href="/hello-world/"><%= t('hello-world.title') %></a></p>
|
|
350
|
+
`;
|
|
351
|
+
await fs.writeFile(path.join(projectPath, 'src/pages/index.ejs'), indexEjs);
|
|
352
|
+
|
|
341
353
|
console.log(`\n✅ Project "${name}" initialized successfully!`);
|
|
342
354
|
console.log(`👉 Next steps:`);
|
|
343
355
|
console.log(` cd ${name}`);
|
package/package.json
CHANGED
package/scripts/builds/pages.js
CHANGED