added post install script shebang
This commit is contained in:
1 parent
812b63b20a
commit
07471e3663
1 file changed
+11
-9
@@ -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)
|
||||
Reference in new issue
Block a user