Skip to content

Commit e3cb7cb

Browse files
committed
fix(build): Error if dist does not contain css folder, closes #64
1 parent da4033e commit e3cb7cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

__tests__/commands.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe('build:electron', () => {
179179
fs.existsSync.mockReturnValueOnce(true)
180180
await runCommand('build:electron')
181181
// css/fonts folder was created
182-
expect(fs.mkdirSync.mock.calls[0][0]).toBe(
182+
expect(fs.ensureDirSync.mock.calls[0][0]).toBe(
183183
'projectPath/dist_electron/bundled/css/fonts'
184184
)
185185
// fonts was copied to css/fonts

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ module.exports = (api, options) => {
118118
await api.service.run('build', vueArgs)
119119
// Copy fonts to css/fonts. Fixes some issues with static font imports
120120
if (fs.existsSync(api.resolve(outputDir + '/bundled/fonts'))) {
121-
fs.mkdirSync(api.resolve(outputDir + '/bundled/css/fonts'))
121+
fs.ensureDirSync(api.resolve(outputDir + '/bundled/css/fonts'))
122122
fs.copySync(
123123
api.resolve(outputDir + '/bundled/fonts'),
124124
api.resolve(outputDir + '/bundled/css/fonts')

0 commit comments

Comments
 (0)