windowpp 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/lib/create.js +2 -10
  2. package/package.json +1 -1
package/lib/create.js CHANGED
@@ -89,7 +89,7 @@ async function create(name, options = {}) {
89
89
  const cliDir = path.resolve(__dirname, '..');
90
90
  const templates = listTemplates(cliDir);
91
91
 
92
- // Resolve template — prompt if none given or the name doesn't exist yet
92
+ // Resolve template — prompt if none given
93
93
  let template = options.template;
94
94
  if (!template) {
95
95
  if (templates.length === 0) {
@@ -103,18 +103,12 @@ async function create(name, options = {}) {
103
103
  }
104
104
  }
105
105
 
106
- if (!name || !/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(name)) {
107
- console.error('Error: app name must start with a letter and contain only letters, digits, hyphens or underscores.');
108
- process.exit(1);
109
- }
110
-
111
106
  const appDir = path.join(outDir, name);
112
107
  if (fs.existsSync(appDir)) {
113
108
  console.error(`Error: directory "${appDir}" already exists.`);
114
109
  process.exit(1);
115
110
  }
116
111
 
117
- const cliDir = path.resolve(__dirname, '..');
118
112
  const templateDir = path.join(cliDir, 'templates', template);
119
113
  if (!fs.existsSync(templateDir)) {
120
114
  console.error(`Error: template "${template}" not found in ${path.join(cliDir, 'templates')}`);
@@ -131,9 +125,7 @@ async function create(name, options = {}) {
131
125
  '{{APP_NAME}}': name,
132
126
  '{{APP_TITLE}}': appTitle,
133
127
  '{{CMAKE_TARGET}}': cmakeTarget,
134
- // Resolved at create-time so vite.config / API.ts can import from the
135
- // installed framework's src/ tree via the @wpp alias.
136
- '{{REPO_ROOT}}': path.join(cliDir, 'framework').replace(/\\/g, '/'),
128
+ '{{REPO_ROOT}}': path.join(cliDir, 'framework').replace(/\\/g, '/'),
137
129
  };
138
130
 
139
131
  console.log(`\n=== WindowPP Create --- ${name} (template: ${template}) ===\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windowpp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "WindowPP CLI — build, dev, and scaffold for WindowPP apps",
5
5
  "type": "commonjs",
6
6
  "bin": {