@reactful/create 0.0.55 → 0.0.57
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
|
3
|
+
import { exec } from 'child_process'
|
3
4
|
import inquirer from 'inquirer'
|
4
5
|
import path from 'path'
|
5
6
|
import fs from 'fs'
|
6
7
|
|
7
|
-
const { exec } = require('child_process');
|
8
8
|
|
9
9
|
const GREEN = '\x1b[32m';
|
10
10
|
const RESET = '\x1b[0m';
|
@@ -16,7 +16,9 @@ console.log(line)
|
|
16
16
|
console.log(`${decor}( ${GREEN}reactful${RESET}.js )${decor}`)
|
17
17
|
console.log(line)
|
18
18
|
|
19
|
-
const
|
19
|
+
const nodeModulesPath = 'node_modules/@reactful/create'
|
20
|
+
|
21
|
+
const templatePath = path.join(process.cwd(), nodeModulesPath, 'templates')
|
20
22
|
|
21
23
|
const templates = fs.readdirSync(templatePath)
|
22
24
|
.map(x => ({ name:x, path: `${templatePath}/${x}`}))
|