Copy also images on node build

This commit is contained in:
Jan Oberhauser 2019-09-22 11:33:53 +02:00
parent 1d54f2d62c
commit e0322162a7
2 changed files with 4 additions and 1 deletions

View file

@ -45,6 +45,7 @@
],
"devDependencies": {
"@oclif/dev-cli": "^1.22.2",
"@types/copyfiles": "^2.1.1",
"@types/inquirer": "^6.5.0",
"@types/tmp": "^0.1.0",
"@types/vorpal": "^1.11.0",
@ -56,6 +57,7 @@
"@types/express": "^4.16.1",
"@types/node": "^10.10.1",
"change-case": "^3.1.0",
"copyfiles": "^2.1.1",
"inquirer": "^7.0.0",
"n8n-core": "^0.10.0",
"n8n-workflow": "^0.11.0",

View file

@ -1,4 +1,5 @@
import { ChildProcess, spawn } from 'child_process';
const copyfiles = require('copyfiles');
import {
readFile as fsReadFile,
write as fsWrite,
@ -107,7 +108,7 @@ export async function buildFiles (options?: IBuildOptions): Promise<string> {
buildProcess.on('exit', code => {
// Remove the tmp tsconfig file
tsconfigData.cleanup();
resolve(outputDirectory);
copyfiles([join(process.cwd(), './*.png'), outputDirectory], { up: true }, () => resolve(outputDirectory));
});
});
}