UNPKG

documon

Version:

A documentation system for mortals. Use with any language.

30 lines 1.76 kB
[ { "text": "A cross-platform way to launch files from Node.\n\nDirect copy of:\nnpmjs: \thttps://www.npmjs.com/package/opn\ngithub: https://github.com/sindresorhus/opn\n\n\n### USAGE \n\n\n\tconst opn = require('opn');\n\n\t// Opens the image in the default image viewer\n\topn('unicorn.png').then(() => {\n\t\t// image viewer closed\n\t});\n\n\t// Opens the url in the default browser\n\topn('http://sindresorhus.com');\n\n\t// Specify the app to open in\n\topn('http://sindresorhus.com', {app: 'firefox'});\n\n\t// Specify app arguments\n\topn('http://sindresorhus.com', {app: ['google chrome', '--incognito']});\n\n", "start": 6, "end": 35, "file": "/Volumes/Drives/projects/documon/documon/src/opn.js", "flags": [ { "source": "@class opnopn", "flag": "class", "after": "opn", "afterType": "opn", "name": "opn", "single": true, "text": "opn" }, { "source": "@package documon", "flag": "package", "after": "documon", "afterType": "documon", "name": "documon", "single": true, "text": "documon" } ], "source": "A cross-platform way to launch files from Node.\n\nDirect copy of:\nnpmjs: \thttps://www.npmjs.com/package/opn\ngithub: https://github.com/sindresorhus/opn\n\n\n### USAGE \n\n\n\tconst opn = require('opn');\n\n\t// Opens the image in the default image viewer\n\topn('unicorn.png').then(() => {\n\t\t// image viewer closed\n\t});\n\n\t// Opens the url in the default browser\n\topn('http://sindresorhus.com');\n\n\t// Specify the app to open in\n\topn('http://sindresorhus.com', {app: 'firefox'});\n\n\t// Specify app arguments\n\topn('http://sindresorhus.com', {app: ['google chrome', '--incognito']});\n\n@class opn\n@package documon", "id": "documon.opn" } ]