Git Product home page Git Product logo

Comments (8)

rask avatar rask commented on June 23, 2024

Please elaborate, do you want to read a YAML file in your Gulpfile into a variable while running a task?

from gulp-yaml-data.

ganlanyuan avatar ganlanyuan commented on June 23, 2024

Yes, I need pase the yaml file as a variable to another task.
I can transfer yaml to json, and get the data as a variable from json file, but that's one more step and also get an unnecessary json file.
If you can help, that will be great!
Thanks

from gulp-yaml-data.

rask avatar rask commented on June 23, 2024

So in essence you have Task 1 that reads a YAML and the YAML should be available to a Task 2?

I think this is bad practise and you should just read the YAML again in Task 2, as the Task 2 might sometimes run without Task 1 running before it, which might break the system.

If you just need to read YAML config to be a global config for all tasks then there are libraries for that.

from gulp-yaml-data.

ganlanyuan avatar ganlanyuan commented on June 23, 2024

Sorry I didn't make it clear.
Actually I want to get the variable within the same task, not another task.

If you just need to read YAML config to be a global config for all tasks then there are libraries for that.

It's just JavaScript data, not for configuration.

from gulp-yaml-data.

rask avatar rask commented on June 23, 2024

I see, so first you'd read the YAML data, then use the YAML data in a following pipe step? I quite certain there already was a Gulp plugin for this but I'll see whether I have the time to see how this could be implemented. If you have any ideas then please do create a pull request. :)

from gulp-yaml-data.

ganlanyuan avatar ganlanyuan commented on June 23, 2024

I see, so first you'd read the YAML data, then use the YAML data in a following pipe step?

Yes.
I searched, but couldn't find a good solution.

from gulp-yaml-data.

rask avatar rask commented on June 23, 2024

I can try to find some time to see how to implement this neatly, no promises. Please, let me know if you stumble upon a solution that works for you so I can see how they have implemented it. :)

from gulp-yaml-data.

ganlanyuan avatar ganlanyuan commented on June 23, 2024

from gulp-yaml-data.

Related Issues (3)

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.