npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-devc

v0.3.0

Published

Quickly add .devcontainer configuration to any JavaScript project, and more!

Downloads

8

Readme

📦 devc

NPM version Build Status Node version XO code style License

Quickly add .devcontainer configuration to any JavaScript project, and more!

But wait, what's a dev container?

A dev container is a full development environment packaged into a Docker container. It's ready to use, easy to update and painless to share with your team. It also brings the complete VS Code experience through the Remote Development extension pack. Dev containers can run locally on your machine, or in the cloud through services like GitHub Codespaces.

You can learn more about dev containers here or watch this introduction video series.

Getting started

There are multiple ways to use the devc tool:

  • Install globally as a CLI tool: npm install -g devc
  • Generate a dev container configuration in a project without installing: npm init devc or yarn create devc or pnpm create devc
  • Add a dev container configuration to an Angular project ng add devc

While the main use case is to generate a dev container configuration, there are also other features provided by the CLI if you install it. For example, you can run a command in a dev container (even if it's not started) or open VS Code directly in a dev container.

Usage

Usage: devc [command] [options]

Commands:
  init                Initialize dev container config (default command)
    -s, --stack <name1, name2, ...>
                      Set the stack to be used (default: autodetect)
    -p, --packageManager <npm|yarn|pnpm>
                      Set package manager (default: autodetect)
    -d, --detect      Force stack detection even if stack option is set
    --list            List available tech stacks

  code [path]         Open folder in a VS Code dev container
    -i, --insiders    Use insiders version of VS Code

  shell [command]     Open a shell in dev container
    -e, --exec <cmd>  Execute command in container shell

General options:
    -v, --version     Show version
    --help            Show this help

Init

devc init will create a .devcontainer folder in the current directory with the configuration for the current project.

By default, it will detect automatically which package manager and which stack is used. You can override this by using the --packageManager and --stack options. Using --stack will override the detection and only use the specified stack, but you can use --detect to use autodetection in addition to your --stack value.

To list available supported stacks, use devc init --list.

Note: the base dev container configuration generated can work with any Node.js project, and it's always possible to customize it after initialization.

Code

devc code will open the current folder in a VS Code dev container directly.

If no path is specified, it will open the current folder. You can also use the --insiders option to open the Insiders version of VS Code.

Shell

devc shell will open an interactive shell in the current folder in an existing dev container.

If the dev container is not running, it will start it for the duration of your session and stop it when you exit the shell.

Using the --exec option, you can directly execute a single command in the dev container shell, without going interactive.

Note: currently, the dev container must have been created in VS Code before you can use this command. Building the dev container from the command line is not (yet) supported.

Contributing

Contributions are welcome! :heart:

You can have a look at the contributing guide to learn how to contribute to this project.

Related projects

  • https://github.com/microsoft/dev-container-spec
  • https://code.visualstudio.com/docs/remote/devcontainer-cli
  • https://github.com/stuartleeks/devcontainer-cli/