добавляет симлинк

This commit is contained in:
2022-05-15 09:46:51 +03:00
parent 74eaf9b8f9
commit ee9527214f
3 changed files with 18 additions and 2 deletions

13
scripts/symlink.js Normal file
View File

@@ -0,0 +1,13 @@
const fs = require('fs')
const process = require('process')
const path = require('path')
const notesSymlink = path.join(process.cwd(), 'src/notes')
if (!fs.existsSync(notesSymlink)) {
fs.symlinkSync(
path.join(process.cwd(), '../content/notes'),
notesSymlink,
'junction'
)
}