-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): fix postinstall to check if files exist
The postinstall hook runs when this package is installed by other packages as well, causing npm install to fail since the postinstall hook where dependent on local files in this package
- Loading branch information
1 parent
c7cb45e
commit a44c621
Showing
3 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const fs = require('fs'); | ||
|
||
// Copy pre-built version of flatpickr | ||
// TODO: remove this when a new version of flatpickr has been released | ||
fs.exists('src/dev-assets/hack/flatpickr.js', () => { | ||
fs.copyFile( | ||
'src/dev-assets/hack/flatpickr.js', | ||
'node_modules/flatpickr/dist/flatpickr.js', | ||
() => { | ||
console.log( | ||
'copied src/dev-assets/hack/flatpickr.js to node_modules' | ||
); | ||
} | ||
); | ||
}); | ||
|
||
// Remove type definitions for jsx-dom | ||
fs.exists('node_modules/jsx-dom/jsx-dom.d.ts', () => { | ||
fs.unlink('node_modules/jsx-dom/jsx-dom.d.ts', () => { | ||
console.log('jsx-dom.d.ts removed!'); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.