GithubHelp home page GithubHelp logo

haroenv / dev-ui Goto Github PK

View Code? Open in Web Editor NEW
15.0 6.0 5.0 151 KB

[WIP] Browser UI for npm and yarn (scripts, dependencies …)

License: MIT License

JavaScript 95.05% HTML 1.14% Shell 1.38% CSS 2.43%
npm yarn ui browser

dev-ui's Introduction

dev-ui

All Contributors

I very quickly tried to make scaffolding for a UI on top of npm/yarn, like Sunil Pai suggested.

How to use

Right now it's not published. What you can already try is:

  • yarn develop and open localhost:3000
  • To try it on another project, run yarn link, switch to the project's root directory and run dev-ui

Todo

  • stream output correctly
  • get possible scripts (/scripts)
  • run script (/scripts/run/:script)
  • get installed dependencies (/dependencies)
  • install dependency
  • remove dependency
  • search for dependency (https://github.com/algolia/npm-search)
  • UI

Contributors

Thanks goes to these wonderful people (emoji key):


Sunil Pai

🤔

Haroen Viaene

💻 🐛 🚇 🤔 👀 ⚠️

Lucas Azzola

💻 🐛 🚇 🤔 👀 ⚠️ 🔧

ranfdev

💻 🎨 🤔

Raathigeshan Kugarajan

🤔 📦 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

dev-ui's People

Contributors

azz avatar haroenv avatar raathigesh avatar ranfdev avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dev-ui's Issues

Add and delete scripts

Bug or a feature

feature

Describe the current situation

scripts can be ran and viewed

How should it be changed

you can add and remove scripts from package.json

Deal with monorepos

Probably we can detect if something is a monorepo by seeing if the parent of the current cwd also has a package.json. In that case we should list all packages in it based on “workspaces” key in it.

project structure

So there's both a server (api) and the static app (the main entry point). I've looked around for a little bit, but I don't really find a clear way on how to make both of those work simply together in both dev and production.

Who has experience in a (as simple as possible) solution, preferably React, backend can be micro or express something else, no big preference. If it's simpler to use e.g. next, how do we do that?

Accessibility of terminal output

Bug or a feature

bug

Describe the current situation

The current terminal theme is very hard to read for foreground colours like yellow. Adding a theme made the output flaky

How should it be changed

Puck accessible foreground or background colours

Open a browser shell instead of a tab

Bug or a feature

feature

Describe the current situation

We open a browser tab, which is nice, but can be confusing to reach to from within browsing if you have a lot open

How should it be changed

  1. Get the default browser on the system (with x-default-browser for example)
  2. try to spawn a window with as little window chrome as possible

Stream output from terminal commands

I did the very basics of streaming the output of execa, but not correctly I think

  1. click on a command name (there should be a "run" button next to it IMO)
  2. command starts on the server
  3. streams to frontend
  4. output continually gets shown in terminal output
  • can be done later: colouring

There should be an in-memory storage of the ran scripts, which is removed when the command is done, so .kill() can be called to the command from the frontend

Add and delete packages

The endpoints already exist, but they don't stream (see also #12) correctly yet. The removal of a dependency should be done in the left sidebar, the addition in the Hit component.

There should be an output channel under the adding of dependencies for the output of the add/remove command

Things to do:

  • add dependency
  • remove dependency
  • specify dependency version
  • show output on the bottom

Monorepo use case load strategy

Do we:

a. Load all the package.json files (scripts, dependencies) on load
b. Defer until the package is selected from the drop-down.

browser UI

image

Could be a react app interacting with the node server

first tab: scripts, left the list of all the scripts (/scripts), and if clicked on "run" button it will stream the stdout and stderr to the info to the side. There should be some way to stop as well

second tab: dependencies, left a list of all dependencies (/dependencies) (devdeps in a separate group), right a search for adding dependencies (basically the same as https://codesandbox.io UI, but local)

cc @threepointone

Looking for feedback

May be this is not the best place to discuss this so feel free to close this issue.

This is some super fast work in a short amount of time. Keep this going 💯

I've been thinking of ways to create non-electron dev tools like this and I was thinking of putting together a framework to make building these kinds of apps faster.

The framework would basically consists of

  • A socket server which would allow you to communicate between the CLI and the Browser UI.
  • Easily invoke methods (kind of how remote works in electron) of CLI from Web UI without worrying about handing socket messages and vice versa
  • Inbuilt updater which would update the installed module
  • Anything that would be useful?

I thought it would be interesting to get your perspective on whether something like that would be helpful or Is it just me thinking it would be useful? 😄

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.