{"id":13532702,"url":"https://github.com/dogoku/ce-codemods","last_synced_at":"2025-04-01T21:30:51.260Z","repository":{"id":144877273,"uuid":"161881698","full_name":"dogoku/ce-codemods","owner":"dogoku","description":"Codemods for custom elements","archived":false,"fork":false,"pushed_at":"2019-02-27T06:56:03.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-02T19:34:19.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dogoku.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-15T07:36:35.000Z","updated_at":"2019-12-28T20:05:28.000Z","dependencies_parsed_at":"2024-01-14T01:05:46.900Z","dependency_job_id":"1774422f-fc16-4321-90e2-1aeaf810b532","html_url":"https://github.com/dogoku/ce-codemods","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogoku%2Fce-codemods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogoku%2Fce-codemods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogoku%2Fce-codemods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dogoku%2Fce-codemods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dogoku","download_url":"https://codeload.github.com/dogoku/ce-codemods/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712944,"owners_count":20821821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:13.037Z","updated_at":"2025-04-01T21:30:50.845Z","avatar_url":"https://github.com/dogoku.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\nce-codemods\n==============================================================================\n\nCodemods to convert from custom-elements v0 to v1\n\nInstallation\n------------------------------------------------------------------------------\n\n```bash\nnpm install\n```\n\nPrerequisites\n------------------------------------------------------------------------------\n\nInstall [`jscodeshift`](https://github.com/facebook/jscodeshift) to run the\ncodemod scripts:\n\n```bash\nnpm install -g jscodeshift\n```\n\nUsage\n------------------------------------------------------------------------------\n\nTo run a single transform\n\n```bash\njscodeshift -t ./src/[transform-name]/index.js path/to/files\n```\n\nTo run all the transforms\n\n```bash\njscodeshift -t ./src/index.js path/to/files\n```\n\nWriting your own codemod\n------------------------------------------------------------------------------\n\nWhen working a new transform, it's suggested to use [ASTExplorer](https://astexplorer.net/)\nwhich offers the best development experience. Configure to use `jscodeshift` as the transform.\n\nOnce you are happy with the result, you can transfer it over to this repo\nand follow the folder structure described below.\n\nUsing the test framework\n------------------------------------------------------------------------------\n\nThis repo comes with a testing setup to help with testing multiple scenarios\nusing fixtures and Jest's snapshot testing.\n\nEach transform should be placed in its own folder under `./src` and needs\nto have the following folder structure:\n\n```bash\n #transform directory\n./src/transform-name\n| #the jscodeshift transform\n| index.js\n| #Jest's default test directory\n| __tests__\n  | #the test entry\n  | transform-name-test.js\n  | #directory to place fixtures\n  | __fixtures__\n    | # fixture files are passed to your transform during testing\n    | # each one should cover one scenario\n    | scenario-one.fixture.js\n    | other-scenario.fixture.js\n```\n\nIn the test entry, use `./util/defineSnapshotTests` to run the fixture tests\n\n```js\nconst defineSnapshotTests = require('../../../util/defineSnapshotTests');\n\ndescribe('transform-name', function() {\n  //run fixture tests\n  defineSnapshotTests(__dirname);\n  //other tests\n  describe('other tests', function () {})\n});\n```\n\nEach fixture file will be run against your transform twice in \n\nTo run the tests, simply run `npm run test` or `jest`\n\nRead Jest's documentation on [snapshots](https://jestjs.io/docs/en/snapshot-testing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogoku%2Fce-codemods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdogoku%2Fce-codemods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdogoku%2Fce-codemods/lists"}