netron.js 616 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-var-requires */

const path = require('path');
const fs = require('fs-extra');

const root = path.dirname(require('enhanced-resolve').sync(__dirname, '@visualdl/netron'));
const pathname = '/netron';
const dist = path.resolve(__dirname, '../dist');
const dest = path.join(dist, pathname);

async function build() {
    await fs.ensureDir(dest);
    await fs.copy(root, dest, {preserveTimestamps: true});
    console.log('Netron copied!');
}

if (require.main === module) {
    build();
}

module.exports = {
    root,
    dest,
    pathname
};