15.1.0 • Published 9 years ago

shopify-codemod v15.1.0

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

shopify-codemod

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

Usage

  1. npm install -g jscodeshift
  2. git clone https://github.com/shopify/javascript or download the zip file
  3. npm run setup
  4. jscodeshift -t <codemod-script> <file>
  5. 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 npm test to run all tests, or npm run 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.

15.1.0

9 years ago

15.0.3

9 years ago

15.0.2

9 years ago

15.0.1

9 years ago

15.0.0

9 years ago

14.0.1

9 years ago

14.0.0

9 years ago

13.0.0

9 years ago

12.3.4

9 years ago

12.3.3

9 years ago

12.3.2

9 years ago

12.3.1

9 years ago

12.3.0

9 years ago

12.1.0

9 years ago

12.0.0

9 years ago

11.3.0

9 years ago

11.2.0

9 years ago

11.1.3

9 years ago

11.0.0

9 years ago

10.11.1

9 years ago

10.11.0

9 years ago

10.10.1

9 years ago

10.10.0

9 years ago

10.9.0

10 years ago

10.8.1

10 years ago

10.7.1

10 years ago

10.7.0

10 years ago

10.6.2

10 years ago

10.6.1

10 years ago

10.6.0

10 years ago

10.5.0

10 years ago

10.4.0

10 years ago

10.3.2

10 years ago

10.3.1

10 years ago

10.3.0

10 years ago

10.2.0

10 years ago