Ship ESM; Adopt latest deps

This commit is contained in:
Alex Dima 2018-03-09 13:43:51 +01:00
parent 13c997af18
commit ca775cc8f3
15 changed files with 8826 additions and 217 deletions

30
scripts/copy.js Normal file
View file

@ -0,0 +1,30 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const fs = require('fs');
const path = require('path');
const source = path.join(process.cwd(), process.argv[2]);
const destination = path.join(process.cwd(), process.argv[3]);
// ensure target dir
(function () {
let dirs = [];
let dirname = path.dirname(destination);
while (dirname !== process.cwd()) {
dirs.push(dirname);
dirname = path.dirname(dirname);
}
dirs.reverse();
dirs.forEach((dir) => {
try { fs.mkdirSync(dir); } catch (err) { }
})
})();
fs.writeFileSync(destination, fs.readFileSync(source));
console.log(`Copied ${process.argv[2]} to ${process.argv[3]}`);