GithubHelp home page GithubHelp logo

Comments (14)

fkling avatar fkling commented on April 19, 2024

I agree that examples of how to use the API would be useful, but I'm not sure how useful contrived examples would be. https://github.com/cpojer/js-codemod/ contains a couple of transforms that are actually used, which could serve as examples. They may need a some more explanation / comments.

cc @cpojer

from jscodeshift.

wincent avatar wincent commented on April 19, 2024

There are also some examples bundled with the React repo. It might be worth linking to these places from the README (if we don't already).

from jscodeshift.

hzoo avatar hzoo commented on April 19, 2024

@jhgg is working on some too https://github.com/jhgg/js-transforms (from #codemod in reactiflux)

from jscodeshift.

fkling avatar fkling commented on April 19, 2024

Maybe we should just create a wiki page that links to projects using jscodeshift.

from jscodeshift.

jhgg avatar jhgg commented on April 19, 2024

I am working on learning code modding. My examples probably aren't the best. Always looking for feedback on what I did wrong and what I can do better.

from jscodeshift.

hzoo avatar hzoo commented on April 19, 2024

Wiki sounds ok - and @jhgg you can always add tests

from jscodeshift.

igncp avatar igncp commented on April 19, 2024

The wiki idea is great. At the end, having examples from multiple sources is enough for getting started, just the three links you mentioned seem to have a lot of value for learning purposes.

from jscodeshift.

hzoo avatar hzoo commented on April 19, 2024

Made a simple wiki page: https://github.com/facebook/jscodeshift/wiki/Codemod-Examples for now

from jscodeshift.

fkling avatar fkling commented on April 19, 2024

Thanks @hzoo!

from jscodeshift.

igncp avatar igncp commented on April 19, 2024

Thank you!

from jscodeshift.

cpojer avatar cpojer commented on April 19, 2024

How do you guys feel about adding this to the README? The problem with the wiki on GitHub is that it isn't discoverable. And if this is just 3-5 links it doesn't hurt adding an "Examples" section to the readme I think.

from jscodeshift.

hzoo avatar hzoo commented on April 19, 2024

Sounds good since theres only 2 links right now and no link to it (unless you link to the wiki on the readme)

from jscodeshift.

fkling avatar fkling commented on April 19, 2024

Yeah, I would just link the wiki from the readme.

from jscodeshift.

steve-taylor avatar steve-taylor commented on April 19, 2024

There aren't any simple examples, such as how to change the literal value of an object property that has a specific name.

from jscodeshift.

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.