-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
config to make npm package #18
Conversation
Hello @romannep , Thank you for this. Best, |
Ok. It will be greate. Now is difficult to use because of ablusote imports - you have to copy folders directly to your I've tested on production build and make some changes to babel config. |
@romannep I'm new to importing libraries in to React. When you are building the package are you building it in the node_modules/material-kit-react dir? Or are you building a package from the main project folder? I've been working on trying to import this material-kit for two days now and have been unable to get it to display. |
@bgongre
then I use components as
|
.gitignore
Outdated
# package | ||
/dist | ||
|
||
# complied css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably meant "compiled"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thanks
@romannep @einazare I tried these steps but my project fails with the following errors Failed to compile. (undefined) ./src/client/common/App.js I tried different variations and couldn't get it working, any tips on what can be done to fix it? |
Hello @gvbkr , You can install our product using npmjs. Best, |
@einazare Does this apply to the pro packages too. (sorry I was not clear in my question earlier I guess) Specifically can you please share instructions to install /material-dashboard-pro-react and Material Kit PRO React. I got both of them and would like to use them in different projects. |
Hello again @gvbkr , The PRO versions are not on NPM as of moment. Best, |
I'm having trouble using the components after using npm i material-kit-react. I can't seem to get the components to load. I'm using create-react-app to initialize my project. Are there any extra steps that I need to do to get this to work and how would I go importing a component? ex.) import Badge from 'material-kit-react/src/components/Badge/Badge.js' doesn't seem to work for me. |
Minimal config to solve #16 (may also partially cover #15 and #13 ).
To build a package:
Script will make a
dist
folder. After that there will be two ways:Components from npm package will be accessed as:
package.json
atdist
folder and publish package fromdist
folder.Components from npm package will be accessed as: