Practice English vocabulary for npm/yarn package scripts, pre/post hooks, and script conventions used in professional development teams.
0 / 14 completed
1 / 14
What does a developer mean by 'npm run build'?
'npm run build' executes whatever command is defined under the 'build' key in the scripts section of package.json — typically compiling or bundling the project.
2 / 14
A colleague says 'the script runs the linter before tests'. What does this imply?
This describes a script ordering where linting is executed first (often via a 'pretest' hook or explicit chaining) before the test suite runs.
3 / 14
What are 'pre/post hooks in package.json scripts'?
npm automatically runs 'pre' before and 'post' after any script named ''. For example, 'pretest' runs before 'test'.
4 / 14
What does 'custom script aliases vocabulary' refer to in a team context?
Teams define custom script names like 'dev', 'lint:fix', or 'db:seed' in package.json so developers use consistent, short commands instead of memorizing long CLI strings.
5 / 14
A team says 'we standardized all projects on the same script names'. What is the benefit?
Standardizing script names (e.g., always 'npm run dev' to start, 'npm run test' to test) means developers can onboard to any project and run familiar commands immediately.
6 / 14
Liam: 'Hey, I've added a script to the package.json that runs every time we deploy to staging. It just logs some environment details.'
During a code review, you notice this script. Which of the following best describes what Liam is likely doing?
Liam's action—running a script during deployment to log environment details—is a common and beneficial practice. These scripts often contain crucial information for debugging issues in the staging environment before release. The key is that it's *not* an automated test; rather, it provides real-time insights without requiring manual steps. This contrasts with options A, C, and D, which misinterpret the script's purpose or suggest unnecessary complexity.
7 / 14
Liam: 'Hey, I've added a script to the package.json that runs every time we deploy to staging. It just logs some environment details.'
During a code review, you notice this script. Which of the following best describes what Liam is likely doing?
Liam's action—running a script during deployment to log environment details—is a common and beneficial practice. These scripts often contain crucial information for debugging issues in the staging environment before release. The key is that it's *not* an automated test; rather, it provides real-time insights without requiring manual steps. This contrasts with options A, C, and D, which misinterpret the script's purpose or suggest unnecessary complexity.
8 / 14
Liam: 'Hey, I've added a script to the package.json that runs every time we deploy to staging. It just logs some environment details.'
During a code review, you notice this script. Which of the following best describes what Liam is likely doing?
Liam's action—running a script during deployment to log environment details—is a common and beneficial practice. These scripts often contain crucial information for debugging issues in the staging environment before release. The key is that it's *not* an automated test; rather, it provides real-time insights without requiring manual steps. This contrasts with options A, C, and D, which misinterpret the script's purpose or suggest unnecessary complexity.
9 / 14
Liam: 'Hey, I've added a script to the package.json that runs every time we deploy to staging. It just logs some environment details.'
During a code review, you notice this script. Which of the following best describes what Liam is likely doing?
Liam's action—running a script during deployment to log environment details—is a common and beneficial practice. These scripts often contain crucial information for debugging issues in the staging environment before release. The key is that it's *not* an automated test; rather, it provides real-time insights without requiring manual steps. This contrasts with options A, C, and D, which misinterpret the script's purpose or suggest unnecessary complexity.
10 / 14
Sarah: 'I'm using a script called `npm start` to run the application locally. It seems straightforward.'
During a standup update, you hear Sarah's comment. Which of the following best explains what `npm start` typically does in this context?
The `npm start` script is commonly used to execute the command specified in the `"start"` field of the package.json file. This usually involves launching a development server or running other commands needed for local development. It's *not* deployment, validation, or branch creation – those are handled by separate tools and scripts.
11 / 14
Mark sends this Slack message: 'Just added a script to package.json that runs before our tests. It's using the eslint command.' What does Mark likely intend to achieve with this pre-test script?
Pre-test scripts often utilize linters like eslint to automatically scan code for coding standards violations or potential errors. This helps catch problems early and improve the quality of the codebase before running the actual tests, ensuring a more reliable test execution process. It's distinct from dependency installation or data generation.
12 / 14
David is reviewing a pull request and sees this line in the PR description: 'The script includes a post-deploy hook to update the database schema.' What is the primary purpose of a post-deploy hook?
Post-deploy hooks are executed *after* an application has been successfully deployed to a server. They're commonly used for tasks such as updating databases, configuring servers, or performing other actions that need to happen once the application is live. This contrasts with pre-deploy hooks which run before deployment.
13 / 14
You're discussing 'script aliases' with a colleague. The team has decided to use aliases like `npm run build:prod` instead of `npm run build`. What is the main benefit of using script aliases?
Script aliases provide a shorter, more user-friendly way to invoke complex commands defined within the package.json file. They improve readability and maintainability by abstracting away the underlying command structure, reducing the likelihood of errors when specifying long or complicated scripts. It's about simplifying access.
14 / 14
Elena says: 'We're standardizing all our projects on the same set of script names in the package.json – specifically, we're using `npm run build` and `npm run test` across the board.' What is the *most* likely reason for this standardization?
Standardizing script names significantly streamlines onboarding for new team members. It provides a predictable and familiar command structure, making it easier for them to understand and use the development tools without needing extensive training on different projects' configurations. Consistency is key in collaborative environments.
What does the "Package Scripts Vocabulary" exercise cover?
Practice English vocabulary for npm/yarn package scripts, pre/post hooks, and script conventions used in professional development teams.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
How many questions are in "Package Scripts Vocabulary"?
This exercise has 14 questions. Each one gives instant feedback with an explanation, so you can see exactly why an answer is right or wrong.
Do I need to create an account to save my progress?
No account is required. The progress bar and score are tracked in your browser for the current session -- the exercise is designed to be a quick, repeatable drill rather than something you resume later.
What happens if I get an answer wrong?
You'll see the correct answer highlighted immediately, along with a short explanation of why it's correct. Wrong answers aren't penalized beyond your score, and you can keep going through every question.
How is this exercise different from reading an article?
Articles explain vocabulary and concepts through prose, while exercises like this one are interactive drills -- multiple-choice questions -- that test and reinforce your recall of specific terms and phrasing.
Can I retry this exercise?
Yes -- use the "Try again" button on the results screen to reset your score and go through all the questions again from the start.
Where can I find more Developer Toolchain exercises?
Browse the full Developer Toolchain hub for related drills, or check the site-wide exercises index for other IT English topics.
Is this exercise suitable for beginners?
This exercise assumes basic familiarity with IT terminology. If a term feels unfamiliar, check the site Glossary for a plain-English definition before attempting the questions.
How often is new content like this published?
New exercises are added regularly across all categories, alongside new vocabulary sets and articles. Check back on the exercises hub to see what's new.