From aefa8eb86044f24a5711eb2c0f426ed9a47744f8 Mon Sep 17 00:00:00 2001 From: Pranshu Chittora Date: Thu, 6 Jun 2019 08:47:17 +0530 Subject: [PATCH] docs(contribute): combines seperate sections for npm and yarn previously there were seperate sections for npm and yarn commands, hence in this update those sections were combined into a single sections --- .github/CONTRIBUTING.md | 100 +++++++++++++++------------------------- 1 file changed, 38 insertions(+), 62 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 51ec4e338b2..20c6155dc2a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,11 +10,7 @@ Table of Contents - [Issues](#issues) - [Your first Contribution](#your-first-contribution) - [Setup](#setup) - - [Using npm](#using-npm) - - [Using yarn](#using-yarn) - [Running Tests](#running-tests) - - [Using npm](#using-npm-1) - - [Using yarn](#using-yarn-1) - [Editor Config](#editor-config) - [Dependencies](#dependencies) - [Branching Model](#branching-model) @@ -60,42 +56,34 @@ In case you are suggesting a new feature, we will match your idea with our curre - Fork the **webpack-cli** repo at [https://github.com/webpack/webpack-cli](https://github.com/webpack/webpack-cli). - `git clone && cd webpack-cli` -### Using npm - -- Install the dependencies and link them: - - ```bash - npm install - npm link - npm link webpack-cli - ``` - -- Bootstrap all the submodules before building for the first time - - ```bash - npm run bootstrap - npm run build - ``` - -### Using yarn - - If you don't have yarn yet: ```bash npm install -g yarn ``` -- Install the dependencies and link them +* Install the dependencies and link them: ```bash + #npm + npm install + npm link + npm link webpack-cli + + #yarn yarn yarn link yarn link webpack-cli ``` -- Bootstrap all the submodules before building for the first time +* Bootstrap all the submodules before building for the first time ```bash + #npm + npm run bootstrap + npm run build + + #yarn yarn bootstrap yarn build ``` @@ -107,69 +95,53 @@ In case you are suggesting a new feature, we will match your idea with our curre - Run all the tests with: ```bash + #npm npm run test + + #yarn + yarn test ``` - Run CLI tests with: ```bash + #npm npm run test:cli + + #yarn + yarn test:cli` ``` - Run tests of all packages: ```bash + #npm npm run test:packages + + #yarn + yarn test:packages ``` -- Test a single CLI test case (must run from root of the poject): +- Test a single CLI test case: + + > Must run from root of the poject ```bash + #npm npx jest path/to/my-test.js + + #yarn + yarn jest path/to/my-test.js ``` - You can also install jest globally and run tests without npx: ```bash + #npm npm i -g jest jest path/to/my-test.js - ``` -- You can run the linters: - - ```bash - npm run lint - ``` - -### Using yarn - -- Run all the tests with: - - ```bash - yarn test - ``` - -- Run CLI tests with: - - ```bash - yarn test:cli` - ``` - -- Run tests of all packages: - - ```bash - yarn test:packages - ``` - -- Test a single CLI test case (must run from root of the poject): - - ```bash - yarn jest path/to/my-test.js - ``` - -- You can also install jest globally and run tests: - - ```bash + #yarn yarn global add jest jest path/to/my-test.js ``` @@ -177,6 +149,10 @@ In case you are suggesting a new feature, we will match your idea with our curre - You can run the linters: ```bash + #npm + npm run lint + + #yarn yarn lint ```