added post install script shebang

This commit is contained in:
Emin Khateeb committed 2019-06-14 07:34:01 +02:00
1 parent 812b63b20a
commit 07471e3663
1 file changed
+11 -9
+11 -9
View File
@@ -1,17 +1,19 @@
const fs = require('fs');
const path = require('path');
#!/usr/bin/env node
const projectFilesToDelete = ['.flowconfig', 'App.js', '__tests__/App-test.js'];
const fs = require('fs')
const path = require('path')
const projectFilesToDelete = ['.flowconfig', 'App.js', '__tests__/App-test.js']
const deleteFile = filePath => {
if (!fs.existsSync(filePath)) {
return;
return
}
fs.unlinkSync(filePath);
};
fs.unlinkSync(filePath)
}
const projectPath = path.join(__dirname, '..', '..');
const deleteProjectFile = fileName => deleteFile(path.join(projectPath, fileName));
const projectPath = path.join(__dirname, '..', '..')
const deleteProjectFile = fileName => deleteFile(path.join(projectPath, fileName))
projectFilesToDelete.forEach(deleteProjectFile);
projectFilesToDelete.forEach(deleteProjectFile)