GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — lowcode-engine/modules/code-generator/scripts/run-demo-project at main · csdaa/lowcode-engine Expand file tree/ Copy pathrun-demo-projectMore file actions executable file ·55 lines (47 loc) · 1.57 KB / Copy pathrun-demo-projectFile metadata and controlsexecutable file ·55 lines (47 loc) · 1.57 KB 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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 #!/usr/bin/env node // @ts-check const program = require('commander'); const { spawnSync } = require('child_process'); const glob = require('glob'); const fs = require('fs'); const path = require('path'); const _ = require('lodash'); program .option('--npm <npm>', 'specify the npm command location or alias') .arguments('<project>') .action((project, options) => { try { if (!fs.existsSync(project)) { throw new Error(`Project ${project} does not exist`); } const getProjectActualPath = [ () => path.resolve(process.cwd(), project), () => path.resolve( process.cwd(), path.join( project, path.dirname(glob.sync('*/package.json', { cwd: project })[0] || ''), ), ), ] .map((x) => _.memoize(x)) .find((x) => fs.existsSync(path.join(x(), 'package.json'))); if (!getProjectActualPath) { throw new Error(`Project ${project} is not a valid project(no package.json)`); } const projectActualPath = getProjectActualPath(); if (path.resolve(process.cwd(), project) !== projectActualPath) { console.log('Changing directory to', path.relative(process.cwd(), projectActualPath)); } process.chdir(projectActualPath); const npm = options.npm || 'npm'; const cmd = `${npm} install && ${npm} start`; console.log('# %s', cmd); spawnSync(cmd, { stdio: 'inherit', shell: true }); } catch (err) { console.log(err); process.exit(1); } }); program.parse(process.argv); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |