-
-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathpostinstall.cjs
More file actions
25 lines (24 loc) · 774 Bytes
/
postinstall.cjs
File metadata and controls
25 lines (24 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// eslint-disable-next-line @typescript-eslint/no-require-imports -- This is a CJS file
const fs = require('fs')
if (process.platform !== 'win32') {
fs.symlink(
'../../../node_modules/bulmaswatch',
'./src/static/libraries/bulmaswatch',
(err) => {
if (err) console.log(err)
},
)
} else {
console.log('\x1b[31m[MANUAL ACTION REQUIRED]\x1b[0m')
console.log(
'Windows requires elevated permissions to create symbolic links used by the project.\n',
'Open a Powershell terminal as an Administrator and run the following commands: ',
)
console.log(
'\n cd ',
__dirname,
'\n',
String.raw` New-Item -Path .\src\static\libraries\bulmaswatch -ItemType SymbolicLink -Value .\node_modules\bulmaswatch`,
'\n',
)
}