create-elit 3.2.8 → 3.2.9

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/index.js CHANGED
@@ -45,7 +45,8 @@ async function copyAndReplaceFile(src, dest, replacements) {
45
45
  for (const [placeholder, value] of Object.entries(replacements)) {
46
46
  content = content.split(placeholder).join(value);
47
47
  }
48
- await writeFile(dest, content, "utf-8");
48
+ const finalDest = dest.endsWith("gitignore") && !dest.endsWith(".gitignore") ? join(dirname(dest), ".gitignore") : dest;
49
+ await writeFile(finalDest, content, "utf-8");
49
50
  }
50
51
  async function createProject(projectName2) {
51
52
  const projectPath = resolve(process.cwd(), projectName2);
@@ -25,13 +25,10 @@ export default {
25
25
  copy: [
26
26
  {
27
27
  from: './public/index.html', to: './index.html',
28
- transform: (content: string, config: { basePath: string; projectName: string; }) => {
28
+ transform: (content: string, config: { basePath: string }) => {
29
29
  // Replace script src
30
30
  let html = content.replace('src="../src/main.ts"', 'src="main.js"');
31
31
 
32
- // Replace project name placeholder
33
- html = html.replace(/ELIT_PROJECT_NAME/g, config.projectName);
34
-
35
32
  // Inject base tag if basePath is configured
36
33
  if (config.basePath) {
37
34
  const baseTag = `<base href="${config.basePath}/">`;
@@ -0,0 +1,7 @@
1
+ node_modules
2
+ dist
3
+ .env
4
+ .env.local
5
+ *.log
6
+ .DS_Store
7
+ data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-elit",
3
- "version": "3.2.8",
3
+ "version": "3.2.9",
4
4
  "description": "Scaffolding tool for creating Elit projects",
5
5
  "type": "module",
6
6
  "bin": {