-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix missing svg issue lint * Put back before deploy Script path * Readable empty message * No npmignore * Fix linux issue with path
- Loading branch information
1 parent
3e90fc9
commit 2bd0394
Showing
5 changed files
with
30 additions
and
19 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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
'use strict'; | ||
const ncp = require('ncp').ncp; | ||
const { ncp } = require('ncp'); | ||
const { resolve } = require('path'); | ||
const { mkdirSync, existsSync } = require('fs'); | ||
|
||
const folderToCopy = [ | ||
{ | ||
src: './pages', | ||
dest: './bin' | ||
}, | ||
{ | ||
src: './img', | ||
dest: './bin/img' | ||
} | ||
]; | ||
const folderToCopy = [{ src: resolve('./pages'), dest: resolve('./bin/pages') }, { src: resolve('./img'), dest: resolve('./bin/img') }]; | ||
|
||
folderToCopy.forEach(folder => ncp(folder.src, folder.dest)); | ||
if (!existsSync(resolve('./bin'))) { | ||
mkdirSync(resolve('./bin'), { recursive: true }); | ||
} | ||
|
||
folderToCopy.forEach(folder => | ||
ncp(folder.src, folder.dest, err => { | ||
if (err) throw err; | ||
}) | ||
); |
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