Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !2562

Fix eject command updating scripts output

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/paweljedrzejczyk/fix-eject-updating-scripts-output into master Jun 18, 2017
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: paweljedrzejczyk

Hi :) I've a spotted a small bug in eject command output. Steps to reproduce:

Given the package.json file:

"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"stylelint": "node ./node_modules/stylelint/bin/stylelint.js src/**/*.scss",
"eslint": "node ./node_modules/eslint/bin/eslint.js src/**/*.js"

As you can see there are two custom scripts that were added after the project was created. The output of npm run eject is:

Replacing "react-scripts start" with "node scripts/start.js"
Replacing "react-scripts build" with "node scripts/build.js"
Replacing "react-scripts test" with "node scripts/test.js"
Replacing "react-scripts stylelint" with "node scripts/stylelint.js"
Replacing "react-scripts eslint" with "node scripts/eslint.js"

While the updated package.json looks like:

"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js --env=jsdom",
"stylelint": "node ./node_modules/stylelint/bin/stylelint.js src/**/*.scss",
"eslint": "node ./node_modules/eslint/bin/eslint.js src/**/*.js"

so those two custom scripts were untouched and it's ok, because they are not related to the Create React App.

I have added a simple check to fix the misleading message. After the fix the output looks like:

Replacing "react-scripts start" with "node scripts/start.js"
Replacing "react-scripts build" with "node scripts/build.js"
Replacing "react-scripts test" with "node scripts/test.js"

Cheers,

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/paweljedrzejczyk/fix-eject-updating-scripts-output