-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: user ignore the file suffix and uses the alias(@) to refer a file
- Loading branch information
Showing
4 changed files
with
26 additions
and
0 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
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,14 @@ | ||
import fs from 'fs' | ||
import path from 'path' | ||
import { readSync, writeSync } from '../utils/file' | ||
|
||
export function genePatches (patchesDir: string): void { | ||
// read all patches name | ||
const patchesInfo = fs.readdirSync('patches'); | ||
// inject patch | ||
patchesInfo.forEach(patch => { | ||
const filePath = path.resolve(patchesDir, patch); | ||
const patchContent = readSync(path.resolve('patches', patch)); | ||
writeSync(filePath, patchContent); | ||
}); | ||
} |