mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 23:59:59 -05:00
e7d7da85df
This commit fixes CJS resolution when there's a local "node_modules/" directory. Before this commit relative imports from CJS files where resolved relative to root directory of the package instead of relative to referrer file.
20 lines
464 B
JavaScript
20 lines
464 B
JavaScript
import yargs from "npm:yargs@15.4.1";
|
|
|
|
const args = yargs(["serve", "8000"])
|
|
.command("serve [port]", "start the server", (yargs) => {
|
|
return yargs
|
|
.positional("port", {
|
|
describe: "port to bind on",
|
|
default: 5000,
|
|
});
|
|
}, (argv) => {
|
|
console.info(`start server on :${argv.port}`);
|
|
})
|
|
.option("verbose", {
|
|
alias: "v",
|
|
type: "boolean",
|
|
description: "Run with verbose logging",
|
|
})
|
|
.argv;
|
|
|
|
console.log(args);
|