tackl 1.0.2 → 1.0.4

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/bin/tackl.js +23 -42
  2. package/package.json +1 -1
package/bin/tackl.js CHANGED
@@ -28,19 +28,19 @@ const showBanner = () => {
28
28
  console.log(
29
29
  pc.bold(
30
30
  pc.cyan(`
31
- ╔══════════════════════════════════════════════════════════════╗
32
- ║ ║
33
- ║ ████████╗ █████╗ ██████╗██╗ ██╗██╗ ║
34
- ║ ╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝██║ ║
35
- ║ ██║ ███████║██║ █████╔╝ ██║ ║
36
- ║ ██║ ██╔══██║██║ ██╔═██╗ ██║ ║
37
- ║ ██║ ██║ ██║╚██████╗██║ ██╗███████╗ ║
38
- ║ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ║
39
- ║ ║
40
- ║ The Ultimate Next.js Starter Kit ║
41
- ║ with Waffl Grid System ║
42
- ║ ║
43
- ╚══════════════════════════════════════════════════════════════╝
31
+ ╔═════════════════════════════════════════════════╗
32
+ ║ ║
33
+ ║ ████████╗ █████╗ ██████╗██╗ ██╗██╗ ║
34
+ ║ ╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝██║ ║
35
+ ║ ██║ ███████║██║ █████╔╝ ██║ ║
36
+ ║ ██║ ██╔══██║██║ ██╔═██╗ ██║ ║
37
+ ║ ██║ ██║ ██║╚██████╗██║ ██╗███████╗ ║
38
+ ║ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ║
39
+ ║ ║
40
+ ║ The Ultimate Next.js Starter Kit ║
41
+ ║ with Waffl Grid System ║
42
+ ║ ║
43
+ ╚═════════════════════════════════════════════════╝
44
44
  `)
45
45
  )
46
46
  );
@@ -156,12 +156,12 @@ ${pc.bold('Repository:')} https://github.com/12-studio/tackl
156
156
  const res = await fetch(tarUrl);
157
157
  if (!res.ok)
158
158
  throw new Error(`Download failed: ${res.status} ${res.statusText}`);
159
- const out = fs.createWriteStream(tmpTar);
160
- await new Promise((resolve, reject) => {
161
- res.body.pipe(out);
162
- res.body.on('error', reject);
163
- out.on('finish', resolve);
164
- });
159
+
160
+ // Convert response to buffer and write to file
161
+ const arrayBuffer = await res.arrayBuffer();
162
+ const buffer = Buffer.from(arrayBuffer);
163
+ fs.writeFileSync(tmpTar, buffer);
164
+
165
165
  log.ok('Template downloaded successfully!');
166
166
  } catch (e) {
167
167
  log.error(`Download failed: ${e.message}`);
@@ -221,17 +221,9 @@ ${pc.bold('Repository:')} https://github.com/12-studio/tackl
221
221
 
222
222
  if (doInstall) {
223
223
  try {
224
- const pm = detectPM();
225
- log.info(`Installing dependencies with ${pm} ...`);
226
- execSync(
227
- pm === 'pnpm'
228
- ? 'pnpm install'
229
- : pm === 'yarn'
230
- ? 'yarn'
231
- : 'npm install',
232
- { cwd: targetDir, stdio: 'inherit' }
233
- );
234
- log.ok('Dependencies installed.');
224
+ log.step('📦 Installing dependencies with npm...');
225
+ execSync('npm install', { cwd: targetDir, stdio: 'inherit' });
226
+ log.ok('Dependencies installed successfully!');
235
227
  } catch (e) {
236
228
  log.warn(`Install failed: ${e.message}`);
237
229
  }
@@ -245,21 +237,10 @@ ${pc.bold('Repository:')} https://github.com/12-studio/tackl
245
237
  );
246
238
  console.log(` Next steps:`);
247
239
  console.log(` 1) cd ${rel}`);
248
- if (!doInstall) console.log(` 2) npm install (or pnpm/yarn)`);
240
+ if (!doInstall) console.log(` 2) npm install`);
249
241
  console.log(` ${doInstall ? '2' : '3'}) npm run dev`);
250
242
  }
251
243
 
252
- function detectPM() {
253
- try {
254
- execSync('pnpm --version', { stdio: 'ignore' });
255
- return 'pnpm';
256
- } catch {}
257
- try {
258
- execSync('yarn --version', { stdio: 'ignore' });
259
- return 'yarn';
260
- } catch {}
261
- return 'npm';
262
- }
263
244
 
264
245
  main().catch(e => {
265
246
  console.error(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tackl",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "The ultimate Next.js starter kit with Waffl Grid system",
5
5
  "type": "module",
6
6
  "bin": {