GithubHelp home page GithubHelp logo

Comments (4)

danieldelcore avatar danieldelcore commented on April 20, 2024 1

Looks like this is already supported! Currently jscodeshift lets you pass a url to the --transform cli arg. Which means you can pass raw files from github or gist.

So the workflow from astexplorer is admittedly convoluted but still works so 🤷

  1. Write a transform
  2. Press 'Snippet' in the top nav
  3. Then 'Share'.
  4. A modal will show up with three options. Go to the provided 'Gist' URL
  5. That will take you to a gist with a couple of files. Your transform will be one of them.
  6. Now scroll down to your transform.js and press raw
  7. Copy the url to the raw transform
  8. Run jscodeshift with that url as the transform param.

Example: jscodeshift --transform="https://gist.githubusercontent.com/astexplorer/294702b0d5b73c3e1f44e630fa81ccbf/raw/80ef86991585ee03001c4de49cb61d1eb8f789e6/transform.js" path/to/code

from jscodeshift.

hzoo avatar hzoo commented on April 20, 2024

This would be amazing

from jscodeshift.

fkling avatar fkling commented on April 20, 2024

It's not possible right now, since we don't run our own server. But we have to solve the parse situation anyway, so probably afterwards :)

from jscodeshift.

hzoo avatar hzoo commented on April 20, 2024

I was thinking the same for babel (although probably out of scope) babel src -d lib --plugins http://astexplorer.net/#/QaBzVS9XHK. You could parse the html and output a hidden div with the plugin code haha.

What would be fun to do is to use requirefromtwitter/twpm

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.