-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
27 lines (20 loc) · 912 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /usr/bin/env node
'use strict'
const ora = require('ora');
const emoji = require('node-emoji');
const clone = ora(`Cloning the repository... ${emoji.get('inbox_tray')}`);
const installing = ora(`Installing dependencies... ${emoji.get('package')}`);
clone.color = "blue";
installing.color = "blue";
const appName = process.argv[2] || 'vue-tailwind-boilerplate';
const { spawnSync } = require('child_process');
const url = 'https://github.com/videsk/vue-tailwind-boilerplate.git';
console.log('Creating', appName);
clone.start();
spawnSync('git', ['clone', url, `${process.cwd()}/${appName}`]);
clone.succeed();
installing.start();
spawnSync('npm', ['install', '--prefix', `${process.cwd()}/${appName}`]);
installing.succeed();
console.log(emoji.get('tada'), 'The Vue + TailwindCSS Boilerplate was installed');
console.log('NPX package created with', emoji.get('heart') ,' by Videsk https://videsk.io');