GithubHelp home page GithubHelp logo

hashrock / deno-opn Goto Github PK

View Code? Open in Web Editor NEW
40.0 40.0 3.0 26 KB

Opens stuff like websites, files, executables. Cross-platform, for Deno.

Home Page: https://doc.deno.land/https/raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts

License: MIT License

TypeScript 58.56% JavaScript 41.44%

deno-opn's People

Contributors

electronicsarchiver avatar hashrock avatar sdimkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deno-opn's Issues

Smoke test

We might not do much testing on GitHub Actions(Linux CLI), but at least we can see if the deno execution passes.

WSL Support

The original opn can determine that it is itself running from the WSL.

Deno can't do that because of:

  • "platform" in WSL returns just { arch: "x64", os: "linux" }
  • there is no os.release().

doesn't work on deno/linux

if i start the most simple example utilizing your code by deno 0.35.0 on debian linux;

import { opn } from 'https://denopkg.com/hashrock/deno-opn/opn.ts';
opn('https://example.com');

i'll only get this error reports:

error TS2339: Property 'platform' does not exist on type 'typeof Deno'.

► https://raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts:1:14

1 const { run, platform } = Deno;
               ~~~~~~~~

error TS2532: Object is possibly 'undefined'.

► https://raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts:34:19

34   const appArgs = optsWithDefault.app.slice(1);
                     ~~~~~~~~~~~~~~~~~~~

error TS2532: Object is possibly 'undefined'.

► https://raw.githubusercontent.com/hashrock/deno-opn/master/opn.ts:35:39

35   const openApp: string | undefined = optsWithDefault.app[0];
                                         ~~~~~~~~~~~~~~~~~~~


Found 3 errors.

Documentation Suggestions

I saw that you use GitHub Pages now,
unfortunately there are some problems
with markdown as you might have noticed.

https://hashrock.github.io/deno-opn/

How about moving the documentation that
is present in the README and the example
from the /Documentation/ folder into
a dedicated branch called Documentation
with the root as it's entry point?

Reformat

use deno fmt to conform to deno convention.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.