Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Script descriptions per projectType #296

Open
AWolf81 opened this issue Oct 20, 2018 · 1 comment
Open

Script descriptions per projectType #296

AWolf81 opened this issue Oct 20, 2018 · 1 comment
Assignees
Labels
bug Something isn't working Discussion Something to discuss

Comments

@AWolf81
Copy link
Collaborator

AWolf81 commented Oct 20, 2018

Describe the bug
During my work on #292 I've noticed that Next.js is adding a script with the name start which is used for a different purpose. It is not the development server. It's the server to serve the production build locally.
The development server script is called dev.

This issue needs to wait for the mentioned PR.

To Reproduce

  1. Create a new Next.js project and have a look at description for start script
  2. Create a new CRA project. It will have the same description for start script

Expected behavior
We should have a naming that's more specific to each project type.

I think we have two options to solve this:

  1. Create a new reducer project-description.reducer and store the description on the redux state. e.g.
     { 
       'create-react-app': {
          start: 'Run a local development server',
          build: 'Bundle your project for production',
          test: 'Run the automated tests',
          eject: 'Permanently reveal the create-react-app configuration files',
          format: 'Runs a formatter that tweaks your code to align with industry best-practices'
       },
       gatsby: {
         // same as CRA - duplicate string here
       },
       nextjs: {
         start: 'Starts the application in production mode',
         build: 'Bundle your project for production'
       }
     }
  2. Add the description to a config file

Screenshots
grafik

Environment:

  • OS: all
  • Version: master
  • Node version: -

Things to discuss:

  • Do we need this description on a per project basis? That would be needed if we want to implement custom task descriptions per project.
  • Is it OK to store the description in state? If we want the description project specific maybe we need to store it in a guppy configuration folder e.g. .guppy and save it in a configuration file. This would also allow us to move the guppy stuff from package.json to a configuration file inside .guppy
@AWolf81 AWolf81 added bug Something isn't working Discussion Something to discuss labels Oct 20, 2018
@AWolf81
Copy link
Collaborator Author

AWolf81 commented Apr 7, 2019

OK, I'm working on this.

I think the .guppy config file can be added later. I'm adding the project task descriptions to src/config/project-descriptions.js - I think it's not needed as a reducer as it is just an object literal constant.

@AWolf81 AWolf81 self-assigned this Apr 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Discussion Something to discuss
Projects
None yet
Development

No branches or pull requests

1 participant