teambit / bit-lit Goto Github PK
View Code? Open in Web Editor NEWLit element support for Bit Harmony
License: Apache License 2.0
Lit element support for Bit Harmony
License: Apache License 2.0
When I create my lit component with a different name from the example in the bit.dev, I can't see the preview of the component in lit when I run the command bit start
and when I go to the dev tools it shows me this error:
Failed to load resource: net::ERR_TOO_MANY_REDIRECTS
Run the commands:
1.bit new lit bit-poc --ascpect teambit.web-components/lit
1.cd bit-poc
1.bit create lit card
1.bit install
1.bit start
Then wait until it opens up in the browser.
After that go to the dev tools and you will see this error:
Failed to load resource: net::ERR_TOO_MANY_REDIRECTS
To see a preview of my component in the local workspace that it generates
If applicable, add screenshots, exceptions, and logs to help explain your problem.
for harmony workspace
for leagacy
Add any other context about the problem here.
Hi
I'm creating my own aspects for bit
and tried to follow this example, but it throws following error after bit install
and bit status
✖ error: unable to load the extension "teambit.web-components/[email protected]", please use the '--log' flag for the full error.
Upgraded bit version to 0.0.493 and updated the Lit environment version to 0.0.8, getting an error
PS C:\Bit\purchase-cart> bit test
√ teambit.component/isolator, create capsules network (completed in 241ms)
testing total of 2 components in workspace 'purchase-cart'
testing 1 components with environment teambit.web-components/[email protected]
FAIL purchase-mfe/basket-summary/src/basket-summary-component.test.ts
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/en/ecmascript-modules for how to enable it.
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/en/configuration.html
Details:
C:\Bit\purchase-cart\node_modules.pnpm@open-wc\[email protected]\node_modules@open-wc\testing-helpers\index.js:1
({"Object.":function(module,exports,require,_dirname,_filename,global,jest){export { elementUpdated } from './src/elementUpdated.js';
^^^^^^
SyntaxError: Unexpected token 'export'
> 1 | import {fixture, fixtureCleanup} from '@open-wc/testing-helpers';
| ^
2 | import {html} from 'lit-element';
3 | import {BasketSummaryComponent} from './components/basket-summary/basket-summary-component';
4 | import sinon, {SinonSandbox} from 'sinon';
at Runtime.createScriptFromCode (../../Users/Senthilkumar_J/AppData/Local/.bvm/versions/0.0.493/bit-0.0.493/node_modules/jest-runtime/build/index.js:1350:14)
at Object. (purchase-mfe/basket-summary/src/basket-summary-component.test.ts:1:1)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 9.711 s
Ran all test suites.
tested 2 components in 16.655 seconds.
Hi
It seems that whenever I want to create a composition using this environment, I can't write them as functions that takes arguments and properties like the Storybook Format the docs says it is compatible with.
On these two compositions, only the second is visible :
import './l-label';
export const HtmlStringComposition = ({toto}) => `<l-label name="World">${toto}</l-label>`;
HtmlStringComposition.args = {
toto: 'test'
};
export const SecondComposition = `<l-label>test</l-label>`
Plus, there is no error indicating what is going on. There is just no results visible.
Is this normal ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.