Comments (6)
@ondrejsevcik It seems like the codemod is trying to read files with extensions js,ts with this option --extensions js,ts
Can you try this instead and let us know:
npx ember-angle-brackets-codemod angle-brackets --extensions=hbs app/components/<component-name>/template.hbs
from ember-angle-brackets-codemod.
you can specify a component name as follows:
npx ember-angle-brackets-codemod angle-brackets app/templates/some-component.hbs
from ember-angle-brackets-codemod.
@ondrejsevcik can you confirm that it works for you? If so, we can close this issue
from ember-angle-brackets-codemod.
We're using pods structure and it seems it doesn't like it. When i run it with
npx ember-angle-brackets-codemod angle-brackets app/components/<component-name>/template.hbs
it fails with
Error: Command failed: /Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/node_modules/jscodeshift/bin/jscodeshift.js -t /Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/transforms/angle-brackets/index.js --extensions js,ts
at makeError (/Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/node_modules/execa/index.js:278:16)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:56571) UnhandledPromiseRejectionWarning: Error: Command failed: /Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/node_modules/jscodeshift/bin/jscodeshift.js -t /Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/transforms/angle-brackets/index.js --extensions js,ts
at makeError (/Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/Users/ondrejsevcik/.npm/_npx/56571/lib/node_modules/ember-angle-brackets-codemod/node_modules/execa/index.js:278:16)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:56571) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:56571) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
from ember-angle-brackets-codemod.
Thanks, that helps.
btw, it transforms comments into something that will not compile.
{{!-- comment --}}
//will become
{{! comment }}
from ember-angle-brackets-codemod.
resolved by #140
from ember-angle-brackets-codemod.
Related Issues (20)
- Trouble getting codemod to run on my project HOT 16
- Rewrites escaped quotes to quotes (causing Template Compiler Error) HOT 8
- Incorrect transformation of use of contextual component variable into a component invocation HOT 3
- Why is component that has positional parameters got skipped? HOT 1
- skipAttributesThatMatchRegex config needs to use strings in JSON HOT 1
- Update debugging workflow in README
- Nodes whose data attributes are valueless are excluded from codemod HOT 4
- running codemod on rendering tests breaks on < character HOT 6
- Possible to run offline (not using puppeteer / dev server)? HOT 6
- Async error HOT 7
- Error transforming component with a helper that does not use positional params as an attribute
- Is this supposed to work in addons? HOT 1
- Making Telemetry optional instead of default HOT 4
- Error: Protocol error (Page.navigate): Cannot navigate to invalid URL HOT 4
- Can I convert a single component at a time? HOT 6
- Trouble installing on Mac M1 (arm64 arch) machine
- link-to conversion drops params HOT 4
- Incorrect handling of block param properties in iterable helpers HOT 2
- Puppeteer errors with hard to decipher reason HOT 1
- Errors with 5.1.0: Cannot read property 'originalPositionFor' of undefined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-angle-brackets-codemod.