implemented xml file selection/save logic

This commit is contained in:
Malar Kannan
2017-07-29 13:50:51 +05:30
parent 43ba287b5e
commit 44181748d6
3 changed files with 112 additions and 53 deletions

View File

@@ -156,6 +156,8 @@ function build(previousFileSizes) {
}
function copyPublicFolder() {
fs.emptyDirSync(paths.appBuild);
fs.ensureSymlink(paths.appPng,path.resolve(paths.appBuild,'png'));
fs.copySync(paths.appPublic, paths.appBuild, {
dereference: true,
filter: file => file !== paths.appHtml && file !== paths.appPng,
@@ -167,10 +169,9 @@ function copyPublicFolder() {
function startWebPackDevServer(pyServer){
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
const HOST = process.env.HOST || '0.0.0.0';
// fs.emptyDirSync(paths.appBuild);
// fs.ensureSymlink(paths.appPng,path.resolve(paths.appBuild,'png'));
// // Merge with the public folder
// copyPublicFolder();
copyPublicFolder();
// We attempt to use the default port but if it is busy, we offer the user to
// run on a different port. `detect()` Promise resolves to the next free port.