shiftsave / framerx-build-system Goto Github PK
View Code? Open in Web Editor NEWA starter repo to get started with building a Design System within Framerx using production components
License: MIT License
A starter repo to get started with building a Design System within Framerx using production components
License: MIT License
First thx, this project really has me exited, it'd be great to share "codebase" between engineers and designers.
steps:
yarn build
output:
I am expecting, in lib folder after building, to see a new folder (Text) appear, with a Title.js file in it.
What am I missing, is Typescript required ?
Are there more step than "just" importing the compo in the index.ts at the root of the project for the build job to register the new compo ?
Basically when building lib/index.js
it creates a distributable library similar to some npm package with a React component(s), therefore all best practices apply. One of them is to not bundle React itself, otherwise if there is somewhere one of the components uses ref
, likely in Framer X you'll see an error like
Invariant Violation: Element ref was specified as a string (outer) but no owner was set. This could happen for one of the following reasons:
- You may be adding a ref to a functional component
- You may be adding a ref to a component that was not created inside a component's render method
- You have multiple copies of React loaded
See https://fb.me/react-refs-must-have-owner for more information.
To achieve it, in the webpack config externals
can be added like
externals: {
react: {
commonjs: 'react',
commonjs2: 'react',
amd: 'React',
root: 'React'
},
'react-dom': {
commonjs: 'react-dom',
commonjs2: 'react-dom',
amd: 'ReactDOM',
root: 'ReactDOM'
}
}
Hi. Thanks for the great tool!
I'm experimenting with https://github.com/mui-org/material-ui and trying to get its components work. I've succeeded in taking a Button in to Framer X, but other components give me this minified error (right on the workbench when I try to "draw" the component) http://reactjs.org/docs/error-decoder.html?invariant=130
Seems like the problem was with the minified React bundled in ./lib
, but when I try to unbundle it (successfully based on the size and contents of index.js
), I get the same error. I've also tried to use our production components with the entirely different webpack settings, but got the #130
error. Any idea how to solve this?
First and foremost, thank you for providing this codebase to the public along with your blog post. The possibility of coupling production React.js components with design components is very exciting.
I'm aware that this is all very experimental at this point but I am attempting to follow along with the blog post Bringing Design System Components from Production Into Framer X and I am seeing a strange error.
I have:
I have not edited the code in any way but when I design-system.framerx in Framer X I get the following errors:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (framer.debug.js, line 0)
[Error] ReferenceError: Can't find variable: Framer
(anonymous function) (preview.js:1:92908)
r (preview.js:1:115)
(anonymous function) (preview.js:1:528216)
r (preview.js:1:115)
(anonymous function) (preview.js:1:533117)
r (preview.js:1:115)
(anonymous function) (preview.js:1:519)
Global Code (preview.js:1:529)
I am attempting to debug it but am wondering if you have any insights into why Framer would be undefined.
hey, i'm impressed by the work put into this build system and was hoping to use it on a project that i am working on. i don't know enough webpack to figure out a solution, but i am trying to import material-ui components as part of my build system in framer x. i tried to add @material-ui/core
to my dependencies
in my package.json
so that it would get bundled into the generated lib/index.js
file, but i am getting errors in framer x complaining about an Invariant Violation in ./Button.tsx: Minified React error #188
Is integration with material-ui possible with this build system?
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.