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

symbol-link-manager

v1.0.1

Published

Manage symbolic links with a central config

Downloads

6

Readme

👉 symbol-link-manager

symbol-link-manager can manage your projects symbolic links to ease your developer life a little.

The problem

Let me explain why I needed this.

I started develop a site for a client, a WordPress site. And I found it tiresome to open up all levels of folders and jump between the themes and plugins that I used.

Even though I used roots/bedrock the folders structure is still a bit too deep.

So I wanted to place them themes and plugins closer to the project root, and decided to symlink them into the correct folders.

But I needed a simple solution to manage these links.

Enter symbol-link-manager.

The solution

symbol-link-manager uses a central config and will automatically create your symlinks upon executing the cli command.

In my use case it's best used alongside a build-script or after install.

Installation

Install the cli useing npm or yarn.

$ npm i --save-dev symbol-link-manager
$ yarn add --dev symbol-link-manager

Usage

After creating the config file, .symlinkrc, you can run the symbol-link-manager cli-command, either directly from the terminal, or as a script inside package.json.

From terminal:

# From terminal
$ ./node_modules/.bin/symbol-link-manager

As script:

{
  "scripts": {
    "setup-links": "symbol-link-manager"
  }
}
# Then from the terminal
$ npm run setup-links
$ yarn run setup-links

Tip: Setup symbol-link-manager as a script that runs for example after install:

{
  "scripts": {
    "postinstall": "symbol-link-manager"
  }
}

Setup

symbol-link-manager requires a root config file, named .symlinkrc to be set up in the root of your project, alongside your package.json.

Inside it you defined the targets and the location of the links as key-values formatted as JSON. The paths must be either absolute or relative to the root of your project.

Example:

{
  "./themes/{dir}": "./wp/wp-content/themes/{dir}",
  "./plugins/{dir}": "./wp/wp-content/plugins/{dir}"
}

This setup will create links for all directories inside ./themes into ./wp/wp-content/themes, the same for ./plugins.

Note that symbol-link-manager wont overwrite any existing files or links. Instead the CLI command will present a simple overview of which link where created and which were ignored.

Options

There aren't much options to use. But you can tell symbol-link-manager to link only folders, files or all using simple filter.

You use them inside the path strings inside .symlinkrc:

{
  "./path1/{dir}": "./link1/{dir}", // Links only directories
  "./path2/{file}": "./link2/{file}", // Links only files
  "./path3/{all}": "./link3/{all}" // Links both directories and files
}

Contributors

Thanks goes to these wonderful people (emoji key):

| Adam Bergman💻 📖 🤔 | | :---: |

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

License

MIT