Improve Readme
Hi everyone,
I made a few suggestions on the Readme. For a beginner like me, I had a lot of questions when I tried to create my own component. I have listed them below. My apologies if some suggestions are dumb/super-obvious: I had a difficult time figuring them out.
Pointer 2. Find-and-replace: my_dash_component with your component library name. I think it should be made clear about replacing it everywhere: for eg: in package.json, manifest.ini. setup.py etc.
Pointer 3: Note: Relevant dependencies must be isntalled for the component you are creating.
Pointer 4:
It wasnt very clear when I read ' it opens the JS Demo environment' - like does npm start would open a demo-environment. I then realized that it would be running the App.js in the demo folder under src. Ask the users to go through the package.json to see what the npm commands are setup to do.
Pointer 5: Please link the
React Document - React for python devs
to help create the component. Also please mention how the version of React is critical. I realized that there are big changes to how code is written in React 15 and 16. Also refer to the react code for dash-core-components, so that users can see how the react component is written.
Pointer 7 iii:
Add Note: If the MANIFEST.INI does not have the correct references, the tarball would still be created without error but wouldn't work in the local environment. For eg. In my case, the error said that package.json was not found in my_dash_component, but when I looked into the my_dash_component in the repo, it was there. This means, the files did not get correctly copied to the tarball.
Pointer 7 iv:
npm run publish did not work for me. I had to use npm publish.
BEFORE publishing the component, the user needs to first login using npm adduser. If not, npm throws a misleading error "Please try running this command again as root/Administrator." Please refer to this for more details on this issue: https://github.com/npm/npm/issues/20450.
Do a similar thing for PyPi: login before publishing.
Thanks for your input.
I think it should be made clear about replacing it everywhere: for eg: in package.json, manifest.ini. setup.py etc.
We are planning to transform this repo in a cli/cookiecutter, you won't have to manually replace them anymore.
Note: Relevant dependencies must be isntalled for the component you are creating.
npm install covers the packages that are needed by package.json. We should add how to install other dependencies (eg: npm install -S react-duallist will install the package and add it to the dependencies).
Also missing is pip install:
pip install -r requirements.txt
Pointer 4:
I think this is not really clear, personally I never use the js apps and just make python apps to test so I am sure that my components works with the python side.
Pointer 5:
I think the our guide was not complete but should be ready soon or is already. We'll make sure to add the link to the README, thanks.
Pointer 7 iii:
Will be covered by the CLI.
npm run publish did not work for me. I had to use npm publish.
Yes the command is npm publish, thanks for noticing. We should add a link to the npm/pypi docs for publishing packages.
@vivekvs1 Thanks again and feel free to make PRs with the changes.
To add to this, for multi-page apps it would be useful to have a reference to this issue: https://community.plot.ly/t/custom-component-with-multi-page-apps/7145