gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
38 lines (30 loc) • 1.04 kB
JavaScript
/*
* This script should be used to update the goeditor-setup.js and goeditor.css files for existing projects that make use of the goeditor framework
* It takes one argument, which is a relative path to the project directory to be updated;
i.e. node updateEditor <path>
* Example:
* node updateEditor ../testEditor
*/
const child_process = require('child_process');
const fs = require('fs-extra');
const path = require('path');
const ncp = require('ncp').ncp;
const copydir = require('copy-dir');
const rimraf = require('rimraf');
var appPath = process.argv[2];
//console.log(appPath);
if (fs.existsSync(appPath)) {
// Copy / override goeditor-setup.js and goeditor.css to <appPath>
try {
fs.copySync('./goeditor-setup.js', appPath+"/goeditor-setup.js");
console.log("copied goeditor-setup.js");
} catch (err) {
console.error(err);
}
try {
fs.copySync('./goeditor.css', appPath+"/goeditor.css");
console.log("copied goeditor.css");
} catch (err) {
console.error(err);
}
}