Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Update installation instructions for local tool installation
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Aug 10, 2017
1 parent 83b5c3b commit 8a136db
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,29 @@ ln -s dev-lib/.editorconfig . && git add .editorconfig
cp dev-lib/.jshintignore . && git add .jshintignore # don't use symlink for this
```

For ESLint, you'll also likely want to make `eslint` as a dev dependency for your NPM package:
It is a best practice to install the various tools as dependencies in the project itself, pegging them at specific versions as required. This will ensure that the the tools will be repeatably installed across environments. When a tool is installed locally, it will be used instead of any globally-installed version. To install packages locally, for example:

```bash
npm init # if you don't have a package.json already
npm install --save-dev eslint
npm install --save-dev eslint jshint jscs grunt-cli
git add package.json
echo 'node_modules' >> .gitignore

composer init # if you don't have a composer.json already
composer require --dev "wp-coding-standards/wpcs=*"
echo 'vendor' >> .gitignore

git add .gitignore
```

Also make sure you configure your `composer.json` to automatically add WPCS to the `installed_paths` for PHPCS:

```json
"scripts": {
"post-install-cmd": [ "phpcs --config-set installed_paths ../../wp-coding-standards/wpcs/" ]
}
```

See below for how to configure your `.travis.yml`.

### Install via symlink (non-submodule)
Expand Down

0 comments on commit 8a136db

Please sign in to comment.