Giter Site home page Giter Site logo

Question about watching about yamlinc HOT 6 CLOSED

helitik avatar helitik commented on May 27, 2024
Question about watching

from yamlinc.

Comments (6)

francescobianco avatar francescobianco commented on May 27, 2024

Hi @helitik

the --watch works with command that eat the YAML files (es. cat)

you can run

yamlinc --watch cat doc/src/index.yaml

in this way every-time, the file change a cat can be repeated.
is useful when you start a service and need re-restart if configuration changes

from yamlinc.

helitik avatar helitik commented on May 27, 2024

Hi @francescobianco ,

Thank you for your answer!

I've found sourcey/spectacle but this is not compatible with openapi 3.0.

I use widdershins with cli api2html and i'm watching yaml files with yamlinc:

yamlinc --watch "api2html -o doc/dist/index.html -l shell,http,php,javascript" doc/src/index.yaml

I have to write quotes otherwise the -o option of api2html is in conflict with yamlinc (yamlinc write yaml in doc/dist/index.html).

But I get an error with quotes:

Error: spawn api2html -o doc/dist/index.html -l shell,http,php,javascript ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

I've fixed helpers.js line 66:

let wrapper = spawn(cmd, args, { shell: true });

And it works perfectly.

I also found a bug in yamlinc.js line 280:

let match = [];
for (let i in this.extensions) {
  match.push('./**/*.*');
}

I've fixed by:

let match = [];
for (let i in this.extensions) {
  match.push('./**/*.' + this.extensions[i]);
}

If you are interested, I can make a pull request.

from yamlinc.

francescobianco avatar francescobianco commented on May 27, 2024

@helitik Thanks for your supports... let start with pull-request.

from yamlinc.

francescobianco avatar francescobianco commented on May 27, 2024

@helitik In order to make this project grow, I invite all those who contribute to becoming official collaborators. Check out for the invitation on email

from yamlinc.

helitik avatar helitik commented on May 27, 2024

Done by #18

from yamlinc.

francescobianco avatar francescobianco commented on May 27, 2024

Hi @helitik
your patch is online on the new version
https://www.npmjs.com/package/yamlinc/v/0.1.9
Thanks

from yamlinc.

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.