|
2 | 2 | var fs_1 = require('fs'); |
3 | 3 | var path_1 = require('path'); |
4 | 4 | var sort_package_json_1 = require('sort-package-json'); |
5 | | -var file_1 = require('../tools/file'); |
| 5 | +var node_file_exists_1 = require('node-file-exists'); |
6 | 6 | function createFile(pathToFile) { |
7 | | - if (!file_1.fileExists(pathToFile)) { |
| 7 | + if (!node_file_exists_1.default(pathToFile)) { |
8 | 8 | var inputPath = path_1.join(__dirname, '..', '..', 'setup', pathToFile); |
9 | 9 | var test = fs_1.readFileSync(inputPath, 'utf8'); |
10 | 10 | fs_1.writeFileSync(pathToFile, test, 'utf8'); |
11 | 11 | } |
12 | 12 | } |
13 | 13 | function createFolder(pathToFolder) { |
14 | | - if (!file_1.fileExists(pathToFolder)) { |
| 14 | + if (!node_file_exists_1.default(pathToFolder)) { |
15 | 15 | fs_1.mkdirSync(pathToFolder); |
16 | 16 | } |
17 | 17 | } |
@@ -40,7 +40,7 @@ function createTutorialMd() { |
40 | 40 | exports.createTutorialMd = createTutorialMd; |
41 | 41 | function createPackageJson(name) { |
42 | 42 | return new Promise(function (resolve, reject) { |
43 | | - if (!file_1.fileExists('package.json')) { |
| 43 | + if (!node_file_exists_1.default('package.json')) { |
44 | 44 | var inputPath = path_1.join(__dirname, '..', '..', 'setup', 'package.json'); |
45 | 45 | var packageJson = JSON.parse(fs_1.readFileSync(inputPath, 'utf8')); |
46 | 46 | packageJson.name = 'coderoad-' + name; |
|
0 commit comments