@alicesystems/cli 0.1.0-alpha.0 → 0.1.0-alpha.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/dist/apps/cli/package.json +1 -1
- package/dist/index.mjs +0 -0
- package/dist/packages/template-generator/src/foundation.mjs +4 -2
- package/dist/packages/template-generator/templates/base/gitignore.template +12 -0
- package/dist/packages/template-generator/templates/base/npmrc.template +2 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
File without changes
|
|
@@ -40,10 +40,12 @@ export async function planFoundation({ target, name, scope, setupIntent }) {
|
|
|
40
40
|
const entries = await fs.readdir(path.join(template, relative), { withFileTypes: true });
|
|
41
41
|
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name, 'en'))) {
|
|
42
42
|
if (excluded.has(entry.name) || (entry.name.startsWith('.env') && entry.name !== '.env.example') || entry.name.endsWith('.tsbuildinfo')) continue;
|
|
43
|
-
const
|
|
43
|
+
const sourceFile = path.join(relative, entry.name);
|
|
44
|
+
const outputName = entry.name === 'gitignore.template' ? '.gitignore' : entry.name === 'npmrc.template' ? '.npmrc' : entry.name;
|
|
45
|
+
const file = path.join(relative, outputName);
|
|
44
46
|
if (entry.isSymbolicLink()) throw new Error('Template symlinks are unsupported.');
|
|
45
47
|
if (entry.isDirectory()) { await walk(file); continue; }
|
|
46
|
-
let content = await fs.readFile(path.join(template,
|
|
48
|
+
let content = await fs.readFile(path.join(template, sourceFile), 'utf8');
|
|
47
49
|
// These tokens belong only to the bundled reference, never to user files.
|
|
48
50
|
content = content.replaceAll('@alice-reference/', `${project.scope}/`);
|
|
49
51
|
if (file === 'package.json') {
|