Coder Social home page Coder Social logo

glavin001 / shopify-codemod Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shopify/shopify-codemod

0.0 3.0 0.0 232 KB

A collection of Codemods written with JSCodeshift that will help update our old, crusty JavaScript to nice, clean JavaScript.

JavaScript 100.00%

shopify-codemod's Introduction

shopify-codemod

Circle CI

This repository contains a collection of Codemods written with JSCodeshift that will help update our old, crusty JavaScript to nice, clean JavaScript.

Usage

  1. yarn global add jscodeshift
  2. git clone https://github.com/shopify/shopify-codemod or download the zip file
  3. cd shopify-codemod
  4. yarn install
  5. jscodeshift -t <codemod-script> <file>
  6. Use the -d option for a dry-run and use -p to print the output for comparison.

Documentation

The documentation for each transform can be found in the docs folder.

Contributing

All code is written in ES2015+ in the transforms/ directory. Make sure to add tests for all new transforms and features. A custom transforms(fixtureName) assertion is provided which checks that the passed transformer converts the fixture found at test/fixtures/{{fixtureName}}.input.js to the one found at test/fixtures/{{fixtureName}}.output.js. You can run yarn test to run all tests, or yarn test:watch to have Mocha watch for changes and re-run the tests.

Development helpers

bin/create-transform your-transform-name-here creates a transform file, a test file, some empty test fixtures, and a doc file.

bin/rename-transform old-transform-name new-transform-name renames the transforms file, test file, fixture directory, and doc file.

shopify-codemod's People

Contributors

andyfangaf avatar bouk avatar goodforonefare avatar justinthec avatar lemonmade avatar

Watchers

 avatar  avatar  avatar

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.