Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: v2 addon codemod #174

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

wip: v2 addon codemod #174

wants to merge 23 commits into from

Conversation

knownasilya
Copy link
Owner

TODO: figure out what to do with index.js

Next steps:

  • customize the rollup.config.js to suit your needs
  • audit dependencies of both the new addon and test-app
  • run yarn install
  • run yarn run lint:fix in each workspace
  • test your addon cd test-app; yarn test

TODO: figure out what to do with index.js

Next steps:
 - customize the rollup.config.js to suit your needs
 - audit dependencies of both the new addon and test-app
 - run `yarn install`
 - run `yarn run lint:fix` in each workspace
 - test your addon `cd test-app; yarn test`
@knownasilya
Copy link
Owner Author

Error running yarn start in /test-app

Build Error (PackagerRunner) in tests/integration/components/x-toggle-label/component-test.js

Module build failed (from ../../../../../../../../../Users/ilya/maintained/ember-toggle/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 1)
$TMPDIR/embroider/10d4e1/test-app/tests/integration/components/x-toggle-label/component-test.js/component-test.js: Missing component: XToggleLabel in tests/integration/components/x-toggle-label/component-test.js

    at CompatResolver.dependenciesOf (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/compat/src/resolver.js:262:33)
    at NodeTemplateCompiler.precompile (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/core/src/template-compiler-common.js:74:42)
    at precompile (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/core/src/babel-plugin-inline-hbs-deps.js:23:61)
    at insertCompiledTemplate (/Users/ilya/maintained/ember-toggle/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:50:42)
    at PluginPass.CallExpression (/Users/ilya/maintained/ember-toggle/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:139:21)
    at newFn (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/babel-loader-8/node_modules/@babel/traverse/lib/visitors.js:177:21)
    at NodePath._call (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/babel-loader-8/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/babel-loader-8/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/babel-loader-8/node_modules/@babel/traverse/lib/path/context.js:100:31)
    at TraversalContext.visitQueue (/Users/ilya/maintained/ember-toggle/node_modules/@embroider/babel-loader-8/node_modules/@babel/traverse/lib/context.js:103:16)

@knownasilya
Copy link
Owner Author

Now stuck on global failure: Error: Attempted to resolve x-toggle, which was expected to be a component, but nothing was found. but I don't use x-toggle in that form anywhere. I tried {{x-toggle}} and {{component "x-toggle"}} in rules with no luck.

"description": "Checkbox based toggle switch component for Ember.js",
"repository": "https://github.com/knownasilya/ember-toggle",
"license": "MIT",
"author": "Ilya Radchenko",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs "keywords": ["ember-addon"] here

@knownasilya
Copy link
Owner Author

knownasilya commented Nov 18, 2022

Ok, so cached polyfil was the culprit. Now to figure out how to conditionally import styles based on config? OR maybe just instructions on how the user manually imports styles.

Notes on importing css https://discord.com/channels/480462759797063690/491905849405472769/1047212748666314782

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants