You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm kind of taking a chance on facebookincubator/create-react-app with the hopes of simplifying what it takes to build and publish a react component to npm. I think a solid checklist includes the following:
docs/gh-pages (browser routing instead of the complicated static site setup that reactstrap has)
script to publish docs to gh-pages
script for creating release branches with Changelog
script for publishing to npm
testing baked in
CI integration for scripts
I've worked around some create-react-app defaults. I don't think supporting eject is important right now. I think what is important is testing components and publishing them, something it does pretty well out of the box but might need some notes when testing a fork of this.
Notes:
npm run build builds docs, npm run pre-build only creates the transpiled component in lib (used for publishing to npm)
publishing is using babel and requirs a .babelrc file (might be an issue once ejected)
It's like yeoman only every part of the template can be replaced.
You can do like this:
Source code:
<html><head><script "{{cookiecutter.repo_name}}"></script><title>{{cookiecutter.repo_name}} by {{cookiecutter.author_name}}</title>
and so on...
Directory names and filenames can also be templated. For example:
/
/src/components/{{cookiecutter.repo_name}}.jsx
Demo files can automatically use the real names of things without having to be edited after generation and so forth.
So, instead of having to search & replace everywhere, the generation of the skeleton automatically uses the correct fields from the configuration (a simple JSON file with key/value storage of creation parameters like repo_name, license, version and so forth).
I know...another tool...but I've found cookiecutter very helpful for things just like this where you need to make a bunch of them and search & replace gets very, very, very old very fast.
Activity
eddywashere commentedon Sep 24, 2016
I'm kind of taking a chance on facebookincubator/create-react-app with the hopes of simplifying what it takes to build and publish a react component to npm. I think a solid checklist includes the following:
I've worked around some
create-react-appdefaults. I don't think supporting eject is important right now. I think what is important is testing components and publishing them, something it does pretty well out of the box but might need some notes when testing a fork of this.Notes:
npm run buildbuilds docs,npm run pre-buildonly creates the transpiled component inlib(used for publishing to npm)babeland requirs a.babelrcfile (might be an issue once ejected)ssteinerx commentedon Nov 25, 2016
Have you considered using cookiecutter?
It's like yeoman only every part of the template can be replaced.
You can do like this:
Source code:
Directory names and filenames can also be templated. For example:
/ /src/components/{{cookiecutter.repo_name}}.jsxDemo files can automatically use the real names of things without having to be edited after generation and so forth.
So, instead of having to search & replace everywhere, the generation of the skeleton automatically uses the correct fields from the configuration (a simple JSON file with key/value storage of creation parameters like repo_name, license, version and so forth).
I know...another tool...but I've found cookiecutter very helpful for things just like this where you need to make a bunch of them and search & replace gets very, very, very old very fast.
Let me know what you think!