Skip to content

Commit

Permalink
postinstall - copy all src/* files into project root
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgoeke authored May 1, 2024
1 parent 5eac7af commit 404fe0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"src/**/*.*"
],
"scripts": {
"postinstall": "node -e \"if (process.env.INIT_CWD === process.cwd()) process.exit(); const fs = require('node:fs'); const dest = process.env.INIT_CWD; fs.readdirSync('src').forEach(file => { try { fs.copyFileSync('src/' + file, dest + '/' + file, fs.constants.COPYFILE_EXCL); } catch(e) { if (e.code !== 'EEXIST') throw e; } });\""
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 404fe0c

Please sign in to comment.