Giter Site home page Giter Site logo

Comments (3)

gkalpak avatar gkalpak commented on May 19, 2024

Hey, @Avivhdr!

I haven't really thought about it (since this repo has been intended for personal use 😃), but I wouldn't be opposed if there was a clean way of doing it. However, I see the following issues with loading the aliases from a local config file (off the top of my head):

  • The way this package makes the defined aliases available as executables on the user's PATH is by leveraging NPM's package.json -> bin property. This wouldn't be possible (without hacks?) with locally defined aliases afaik.
  • One of the main purposes of this package is easy installation on any system that has Node.js installed. Having the aliases defined in a local config file kind of beats the purpose (although could be partially worked around by loading the file from a remote location, such as a GitHub gist or repo).

There are ways to work around these issues, but I am not sure if the effort is worth it 😃
It might just be easier to fork this repo and publish it as your own NPM package. You could define your aliases by modifying the ALIASES variable in lib/constants.js and updating the bin field in package.json accordingly.

from aliases.

Avivhdr avatar Avivhdr commented on May 19, 2024

Hi @gkalpak,
I think I'll try to fork the repo and customize it to my needs!

Hopefully, I'll update you soon on how it went.

from aliases.

gkalpak avatar gkalpak commented on May 19, 2024

Awesome! Looking forward to hearing how it went.
Feel free to reach out if you have any questions/need any help. (This project has always been intended for personal use and there are a lot of rough edges 😅)

from aliases.

Related Issues (1)

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.