Coder Social home page Coder Social logo

Comments (6)

adamwathan avatar adamwathan commented on August 29, 2024

Hey Pete! One thing I actually have set up on my machine is to add ./vendor/bin near the beginning my $PATH, so if I'm in a project directory, locally installed tools are preferred.

It's probably not a great idea to force everyone else to do that though, so definitely open to ideas to make this just work automatically.

Could we check for the existence of ./vendor/bin/jigsaw and use that if it exists, falling back to the global install? Haven't worked with filesystem APIs in Node/Gulp before but can definitely look into it.

from jigsaw.

petemcfarlane avatar petemcfarlane commented on August 29, 2024

Yup, you could create a bash file, something like this, to check for existence. Not sure if it's too much of a hack though?

#!/bin/bash
if type jigsaw &> /dev/null; then
    echo jigsaw exists
elif type ./vendor/bin/jigsaw &> /dev/null; then
    sed -i '' 's|jigsaw build|./vendor/bin/jigsaw build|' gulpfile.js
    echo ./vendor/bin/jigsaw exists, updated your gulpfile.js
else
    echo jigsaw executable not found in your \$PATH
fi

from jigsaw.

petemcfarlane avatar petemcfarlane commented on August 29, 2024

Maybe just documenting it as something to be aware of would be cleaner?

from jigsaw.

adamwathan avatar adamwathan commented on August 29, 2024

I think we can use something like this directly in the gulpfile: https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback

Will have a play in a bit 👍

from jigsaw.

erickpatrick avatar erickpatrick commented on August 29, 2024

Hi @petemcfarlane, the gulp command now is able to check whether one has a global or local version of jigsaw. Things are easier for us, now =)

from jigsaw.

damiani avatar damiani commented on August 29, 2024

Addressed in #85

from jigsaw.

Related Issues (20)

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.