joshwcomeau / guppy

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

Refactor project types & add Next.js #292

Closed AWolf81 closed 5 years ago

AWolf81 commented 5 years ago

Related Issue:

59

Summary: This branch is based on branch nextjs-flow (flow for workflow). I first started with this and I pushed it just for completeness. After merging the refactor branch we can safely delete the other branch. I've merged the process-logging branch into this branch so it was easier to develop the refactoring.

As mentioned in the issue comment I first had the idea of having a function inside of the configuration object but I don't like that. Now I'm using the string $port inside of the configuration that will be replaced with the real port number in code. Just top-level replacement of $port is not working but I think we could add this later. Also not sure if we need to support deeply nesting as it is only working for one level e.g.

{
  env: {
    PORT: '$port'
  }
}

Will be replaced to (if available port is 3000):

{
  env: {
    PORT: 3000
  }
}

I think this is also the first step for improving the Gatsby workflow. Do we have an issue for Gatsby improvement? I think I read that on Gitter but I'm not sure what should be improved.

Things to improve / discuss:

Todo

Screenshots/GIFs: Project create with Next.js grafik

Next.js project grafik (failed build because I tested task stopping.)

codecov[bot] commented 5 years ago

Codecov Report

Merging #292 into master will increase coverage by 0.44%. The diff coverage is 51.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #292      +/-   ##
==========================================
+ Coverage   20.09%   20.54%   +0.44%     
==========================================
  Files         235      237       +2     
  Lines        3648     3690      +42     
  Branches      368      369       +1     
==========================================
+ Hits          733      758      +25     
- Misses       2648     2667      +19     
+ Partials      267      265       -2
Impacted Files Coverage Δ
src/config/app.js 100% <ø> (ø) :arrow_up:
src/components/CreateNewProjectWizard/MainPane.js 0% <0%> (ø) :arrow_up:
src/services/dependencies.service.js 25% <0%> (-1.32%) :arrow_down:
...rc/components/TaskDetailsModal/TaskDetailsModal.js 0% <0%> (ø) :arrow_up:
...nts/DevelopmentServerPane/DevelopmentServerPane.js 0% <0%> (ø) :arrow_up:
src/services/project-type-specifics.js 83.33% <0%> (-16.67%) :arrow_down:
src/components/TaskRunnerPane/TaskRunnerPane.js 0% <0%> (ø) :arrow_up:
src/services/process-logger.service.js 33.33% <33.33%> (ø)
src/actions/index.js 93.39% <50%> (-0.89%) :arrow_down:
src/reducers/tasks.reducer.js 61.46% <58.82%> (+1.46%) :arrow_up:
... and 5 more
superhawk610 commented 5 years ago

Looking around, I've seen this Next.js logo used a couple places, I think it would fit slightly better with the existing icons?

next

AWolf81 commented 5 years ago

@melanieseltzer I think I've addressed your review changes. Could you please have a look?

The only open things are:

I think we can tackle the open stuff afterwards.