joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Info for docs #210

Open joshwcomeau opened 6 years ago

joshwcomeau commented 6 years ago

There are a few conventions we should crystallize somewhere. I'm still not sure what the best way is (if we should enumerate every low-level convention, or if we should just link to "good examples" within the codebase)... but until we figure that out, we can collect ideas here.

From #208:

const prevState = { ... };

const action =  { ... };

const expectedState = {...}
const actualState = reducer(prevState, action);

expect(actualState).toEqual(expectedState);
superhawk610 commented 6 years ago

Here are a few rough writeups I've done explaning some of the more complex flows:

AWolf81 commented 6 years ago

As mentioned on Gitter I'd like to add an issue to the docs that occured recently and looks like a bug but we think it's only an installation issue. The issue happend to @superhawk610 and me on Windows. I'm thinking we could add a section like known-issues during development. As I think it took me around one hour to figure out that nothing is broken.

After starting devServer or taskRun a message like following can be displayed telling that react-scripts weren't found. But the weird thing was that devServer was working just the other scripts displayed that message. (For Aaron just devServer wasn't working but the others worked.) error

It looks like an issue with spawn and environment handling but it's not and the following should help to fix the problem:

It would be better to fix the issue but I couldn't find a solution. The problematic location seems to be path addtion to env in getBaseProjectEnvironment in platform.service - testwise removal seems to fix the issue but I think we should keep it as is.

joshwcomeau commented 6 years ago

hm this reminds me of the issue we used to see because of a problematic version of NPM. I thought switching to yarn would have fixed it :/

AWolf81 commented 6 years ago

@joshwcomeau I'd like to add some notes about Zenhub.

Here is a gist for Zenhub - Getting started section.

joshwcomeau commented 6 years ago

Cool, sounds good! I'll read through them tomorrow morning, as I set up Zenhub for the first time =)

AWolf81 commented 6 years ago

We should add an info to our dev docs about the process logging that I'll merge soon.

It can be enabled in src/config/app with LOGGING: true and will enable the logging of every child process. That's especially useful for tasks that don't have a terminal in Guppy UI. Tasks like eject or project creation can be debugged as every output is logged to the Chrome console.

AWolf81 commented 5 years ago

Publishing setup (for local publishing) GH_TOKEN is required for yarn run publish to work. Go to Github settings page and create a Personal access token with Repo permission and add it to your system env. For Ubuntu I had to add it to publish call like following (env. var setting in ~/.bashrc wasn't working for me): GH_TOKEN=personal_access_token yarn run publish

This will run yarn dist and uploads the installer to the release. This is required to be called on each platform Mac, Windows & Linux.