New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

markmap-cli

Package Overview
Dependencies
Maintainers
1
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markmap-cli - npm Package Compare versions

Comparing version 0.4.6 to 0.5.0

types/util.d.ts

33

bin/cli.js
#!/usr/bin/env node
const fs = require('fs').promises;
const { Command } = require('commander');
const open = require('open');
const updateNotifier = require('update-notifier');
const markmap = require('..');
const { main } = require('..');
const pkg = require('../package.json');

@@ -12,28 +9,2 @@

notifier.notify();
const program = new Command();
program
.version(require('../package.json').version)
.description('Create a markmap from a Markdown input file')
.arguments('<input>')
.option('-o, --output <output>', 'specify filename of the output HTML')
.option('--no-open', 'do not open the output file after generation')
.option('-w, --watch', 'watch the input file and update output on the fly, note that this feature is for development only')
.action(async (input, cmd) => {
const content = await fs.readFile(input, 'utf8');
const output = cmd.output || `${input.replace(/\.\w*$/, '')}.html`;
if (cmd.watch) {
await markmap.develop({
input,
output,
open: cmd.open,
});
}
await markmap.createMarkmap({
content,
output,
open: cmd.open,
});
});
program.parse(process.argv);
main(pkg.version);
{
"name": "markmap-cli",
"version": "0.4.6",
"version": "0.5.0",
"description": "Create markmaps from CLI",

@@ -27,9 +27,5 @@ "author": "Gerald <gera2ld@live.com>",

"clean": "del-cli dist",
"prebuild": "run-s ci clean",
"prepublishOnly": "run-s build",
"ci": "run-s lint",
"lint": "eslint --ext .ts .",
"build:types": "tsc",
"build:js": "rollup -c rollup.conf.js",
"build": "run-s build:types build:js"
"build:js": "rollup -c rollup.conf.js"
},

@@ -47,11 +43,11 @@ "bugs": {

"devDependencies": {
"@babel/runtime": "^7.11.2",
"markmap-lib": "^0.11.3"
"@babel/runtime": "^7.13.10",
"markmap-lib": "^0.11.4"
},
"dependencies": {
"chokidar": "^3.4.2",
"commander": "^5.1.0",
"koa": "^2.13.0",
"open": "^7.0.3",
"update-notifier": "^4.1.1"
"chokidar": "^3.5.1",
"commander": "^7.1.0",
"koa": "^2.13.1",
"open": "^8.0.3",
"update-notifier": "^5.1.0"
},

@@ -61,3 +57,3 @@ "engines": {

},
"gitHead": "efdba06cf8ff88739cafc02e2b324aee91340abc"
"gitHead": "cbb56b8ede93b15000a31013a0474891b774a977"
}

@@ -1,6 +0,4 @@

export declare function develop(options: {
input: string;
open: boolean;
}): Promise<{
import { IDevelopOptions } from './util';
export declare function develop(fileName: string, options: IDevelopOptions): Promise<{
close(): Promise<void>;
}>;
import type { IMarkmapCreateOptions } from 'markmap-lib';
import { IDevelopOptions } from './util';
import { develop } from './dev-server';
export * from 'markmap-lib';
export * from './dev-server';
export declare function createMarkmap(options?: IMarkmapCreateOptions & {
/**
* whether to open the generated markmap in browser
*/
open?: boolean;
}): Promise<void>;
export { develop };
export declare function createMarkmap(options: IMarkmapCreateOptions & IDevelopOptions): Promise<void>;
export declare function main(version: string): void;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc