UNPKG

@plastichub/osr-cad

Version:

This is a CLI(CommandLineInterface) toolset to convert 3D files, using Solidworks and other software.

42 lines (40 loc) 1.95 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tail_image = exports.head_image = exports.images = exports.files = exports.write = exports.dir = exports.exists = exports.read = void 0; const fg = require('fast-glob'); var read_1 = require("@plastichub/fs/read"); Object.defineProperty(exports, "read", { enumerable: true, get: function () { return read_1.sync; } }); var exists_1 = require("@plastichub/fs/exists"); Object.defineProperty(exports, "exists", { enumerable: true, get: function () { return exists_1.sync; } }); var dir_1 = require("@plastichub/fs/dir"); Object.defineProperty(exports, "dir", { enumerable: true, get: function () { return dir_1.sync; } }); var write_1 = require("@plastichub/fs/write"); Object.defineProperty(exports, "write", { enumerable: true, get: function () { return write_1.sync; } }); const array_1 = require("../common/array"); const IMAGES_GLOB = '*.+(JPG|jpg|png|PNG|gif)'; const files = (dir, glob) => fg.sync(glob, { dot: true, cwd: dir, absolute: true }); exports.files = files; const images = (source) => (0, exports.files)(source, IMAGES_GLOB); exports.images = images; const head_image = (_images) => (0, array_1.firstOf)(_images); exports.head_image = head_image; const tail_image = (_images) => (0, array_1.lastOf)(_images); exports.tail_image = tail_image; /* export const md2html = (content) => { let converter = new Converter({ tables: true }); converter.setOption('literalMidWordUnderscores', 'true'); return converter.makeHtml(content); } export const toHTML = (path, markdown) => { const content = read(path, 'string') as string; if (!markdown) { let converter = new Converter({ tables: true }); converter.setOption('literalMidWordUnderscores', 'true'); return converter.makeHtml(content); } else { return content; } } */ //# sourceMappingURL=index.js.map