File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 4
4
"description" : " A Vue Cli 3 plugin for Electron with no required configuration" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
7
- "test" : " jest --runInBand" ,
8
- "pretest" : " rimraf __tests__/projects/*"
7
+ "test" : " jest --runInBand"
9
8
},
10
9
"keywords" : [
11
10
" electron" ,
Original file line number Diff line number Diff line change 1
1
const lnk = require ( 'lnk' )
2
2
const fs = require ( 'fs-extra' )
3
+ const rimraf = require ( 'rimraf' )
4
+ // Prevent full and unnecessary project creation
3
5
process . env . VUE_CLI_TEST = true
6
+ // Link ./ to node_modules/vcp-electron-builder to that require.resolve(vcp-electron-builder) returns ./
4
7
fs . removeSync ( './node_modules/vue-cli-plugin-electron-builder' )
5
8
lnk . sync ( [ './' ] , './node_modules/vue-cli-plugin-electron-builder' )
9
+ // Create project dir if it doesn't exist, clear it if it does
10
+ if ( fs . existsSync ( './__tests__/projects' ) ) {
11
+ rimraf . sync ( './__tests__/projects/*' )
12
+ } else {
13
+ fs . mkdirSync ( './__tests__/projects' )
14
+ }
You can’t perform that action at this time.
0 commit comments