create-elit 3.2.8 → 3.3.0

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);
@@ -0,0 +1 @@
1
+ export const users = [];
@@ -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
@@ -1,19 +1,22 @@
1
1
  import { footer, div, p, a } from 'elit/el';
2
2
 
3
3
  export function Footer() {
4
+ const today = new Date();
5
+ const year = today.getFullYear();
6
+
4
7
  return footer({ className: 'footer' },
5
8
  div({ className: 'footer-content' },
6
9
  div({ className: 'footer-section' },
7
- p({ className: 'footer-title' }, 'My Elit App'),
10
+ p({ className: 'footer-title' }, 'ELIT_PROJECT_NAME'),
8
11
  p({ className: 'footer-text' }, 'Built with Elit Framework')
9
12
  ),
10
13
  div({ className: 'footer-section' },
11
- a({ href: 'https://github.com', target: '_blank', className: 'footer-link' }, 'GitHub'),
12
- a({ href: '#', className: 'footer-link' }, 'Documentation'),
14
+ a({ href: 'https://github.com/n-devs', target: '_blank', className: 'footer-link' }, 'GitHub'),
15
+ a({ href: 'https://d-osc.github.io/elit/#/docs', className: 'footer-link' }, 'Documentation'),
13
16
  a({ href: '#', className: 'footer-link' }, 'Support')
14
17
  ),
15
18
  div({ className: 'footer-section' },
16
- p({ className: 'footer-copyright' }, 2026 My Elit App. All rights reserved.')
19
+ p({ className: 'footer-copyright' }, ${year} ELIT_PROJECT_NAME. All rights reserved.`)
17
20
  )
18
21
  )
19
22
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-elit",
3
- "version": "3.2.8",
3
+ "version": "3.3.0",
4
4
  "description": "Scaffolding tool for creating Elit projects",
5
5
  "type": "module",
6
6
  "bin": {