Skip to content
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

Initial Setup #1

Open
4 of 5 tasks
eddywashere opened this issue Sep 24, 2016 · 2 comments
Open
4 of 5 tasks

Initial Setup #1

eddywashere opened this issue Sep 24, 2016 · 2 comments

Comments

@eddywashere
Copy link
Member

eddywashere commented Sep 24, 2016

  • Enable Travis CI
  • Create Hello World Component
  • Verify Docs Publishing
  • Verify NPM Publishing
  • Fork this project, and verify the steps required to publish a component
@eddywashere
Copy link
Member Author

eddywashere commented 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:

  • 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)
  • scripts dir is also a directory used by eject

@ssteinerx
Copy link

ssteinerx commented 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:

<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.

Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants