Skip to content

Commit

Permalink
chore(yarn): replace npm with yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Sep 18, 2017
1 parent 4c8629f commit 83a5fa1
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 55 deletions.
36 changes: 19 additions & 17 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ v6.2.1

### Fork, Clone & Install

Start by [forking stardust][12] to your GitHub account. Then clone your fork and install dependencies:
Start by [forking Semantic UI React][12] to your GitHub account. Then clone your fork and install dependencies:

```sh
git clone git@github.com:<your-user>/Semantic-UI-React.git
cd Semantic-UI-React
npm install
yarn
```

>Note, we use `yarn` because `npm` has unfortunately become unreliable. Get it [here][16].
Add our repo as a git remote so you can pull/rebase your fork with our latest updates:

```
Expand All @@ -72,25 +74,24 @@ Please follow the [Angular Git Commit Guidelines][8] format.

### Commands

>This list is not updated, you should run `npm run` to see all scripts.
>This list is not updated, you should run `yarn run` to see all scripts.
```sh
npm start // run doc site
npm run start:local-modules // run offline (slower builds)
yarn start // run doc site

npm test // test once
npm run test:watch // test on file change
yarn test // test once
yarn test:watch // test on file change

npm run build // build everything
npm run build:dist // build dist
npm run build:docs // build docs
npm run build:docs-toc // build toc for markdown files
yarn build // build everything
yarn build:dist // build dist
yarn build:docs // build docs
yarn build:docs-toc // build toc for markdown files

npm run deploy:docs // deploy gh-pages doc site
yarn deploy:docs // deploy gh-pages doc site

npm run lint // lint once
npm run lint:fix // lint and attempt to fix
npm run lint:watch // lint on file change
yarn lint // lint once
yarn lint:fix // lint and attempt to fix
yarn lint:watch // lint on file change
```

## Workflow
Expand Down Expand Up @@ -371,7 +372,7 @@ See [`src/factories`][13] for special methods to convert props values into React
## Testing
Run tests during development with `npm run test:watch` to re-run tests on file changes.
Run tests during development with `yarn test:watch` to re-run tests on file changes.
### Coverage
Expand Down Expand Up @@ -494,7 +495,7 @@ Our docs are generated from doc block comments, `propTypes`, and hand written ex
Developing against the doc site is a good way to try your component as you build it. Run the doc site with:

```sh
npm start
yarn start
```

### Components
Expand Down Expand Up @@ -571,3 +572,4 @@ Adding documentation for new components is a bit tedious. The best way to do th
[13]: https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/factories
[14]: https://github.com/Semantic-Org/Semantic-UI-React/pull/335#issuecomment-238960895
[15]: https://github.com/Semantic-Org/Semantic-UI-React/issues/607
[16]: https://yarnpkg.com/en/docs/getting-started
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
npm-debug.log*
node_modules/
bower_components/
coverage/
dist/
docs/build/
docs/app/docgenInfo.json
dll/
*.log*
*.iml

.DS_Store
.idea/
.yarn-cache/

*.iml
coverage/
dist/
docs/app/docgenInfo.json
docs/build/
dll/
node_modules/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ Any other issue labeled [`help wanted`][4] is ready for a PR.
On the latest clean `master`:

```sh
npm run release:major
npm run release:minor
npm run release:patch
yarn release:major
yarn release:minor
yarn release:patch
```

Deploy the docs:

```sh
npm run deploy:docs
yarn deploy:docs
```

Update the changelog (requires [github_changelog_generator][15]):
Expand Down
6 changes: 3 additions & 3 deletions docs/app/Views/Usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const Usage = () => (
The Semantic UI React package can be installed via NPM:
</p>
<Segment>
<pre>$ yarn add {pkg.name}</pre>
<pre>$ npm install {pkg.name} --save</pre>
</Segment>
<p>
Expand Down Expand Up @@ -131,9 +132,8 @@ const Usage = () => (
provided <a href={`${semanticUIDocsURL}usage/theming.html`}>here</a>.
</p>
<Segment>
<pre>
$ npm install semantic-ui --save-dev
</pre>
<pre>$ yarn add semantic-ui --dev</pre>
<pre>$ npm install semantic-ui --save-dev</pre>
</Segment>
<p>
After building the project with Gulp, you'll need to include the minified CSS file
Expand Down
1 change: 1 addition & 0 deletions examples/webpack1/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.yarn-cache/
node_modules/
6 changes: 3 additions & 3 deletions examples/webpack1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Get started with Semantic UI React and Webpack 1",
"main": "index.js",
"scripts": {
"analyze": "cross-env ANALYZE_ENV=true npm run build",
"analyze:production": "cross-env ANALYZE_ENV=true npm run build:production",
"analyze": "cross-env ANALYZE_ENV=true yarn build",
"analyze:production": "cross-env ANALYZE_ENV=true yarn build:production",
"build": "webpack",
"build:production": "cross-env NODE_ENV=production npm run build"
"build:production": "cross-env NODE_ENV=production yarn build"
},
"author": "Alexander Fedyashov <a@fedyashov.com>",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions examples/webpack2/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.yarn-cache/
node_modules/
6 changes: 3 additions & 3 deletions examples/webpack2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Get started with Semantic UI React and Webpack 2",
"main": "index.js",
"scripts": {
"analyze": "cross-env ANALYZE_ENV=true npm run build",
"analyze:production": "cross-env ANALYZE_ENV=true npm run build:production",
"analyze": "cross-env ANALYZE_ENV=true yarn build",
"analyze:production": "cross-env ANALYZE_ENV=true yarn build:production",
"build": "webpack",
"build:production": "cross-env NODE_ENV=production npm run build"
"build:production": "cross-env NODE_ENV=production yarn build"
},
"author": "Alexander Fedyashov <a@fedyashov.com>",
"license": "MIT",
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,36 @@
],
"scripts": {
"docs": "gulp docs",
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:docs",
"build": "yarn build:commonjs && yarn build:es && yarn build:umd && yarn build:docs",
"prebuild:commonjs": "rimraf dist/commonjs",
"build:commonjs": "cross-env NODE_ENV=build babel src -d dist/commonjs && npm run tsd",
"build:commonjs": "cross-env NODE_ENV=build babel src -d dist/commonjs && yarn tsd",
"prebuild:es": "rimraf dist/es",
"build:es": "cross-env NODE_ENV=build-es babel src -d dist/es",
"prebuild:docs": "npm run build:docs-toc",
"prebuild:docs": "yarn build:docs-toc",
"build:dll": "gulp dll",
"build:docs": "gulp build:docs",
"build:umd": "cross-env NODE_ENV=build gulp umd",
"build:docs-toc": "doctoc ./.github/CONTRIBUTING.md --github --maxlevel 4",
"build:docs-cname": "echo react.semantic-ui.com > docs/build/CNAME",
"predeploy:docs": "cross-env NODE_ENV=production npm run build:docs && npm run build:docs-cname",
"predeploy:docs": "cross-env NODE_ENV=production yarn build:docs && yarn build:docs-cname",
"deploy:docs": "gh-pages -d docs/build -m 'deploy docs [ci skip]'",
"lint": "cross-env NODE_ENV=production eslint .",
"lint:fix": "npm run lint -- --fix",
"prerelease": "npm run lint -s && npm run tsd:lint -s && npm test -s && cross-env NODE_ENV=production npm run build",
"postrelease": "NODE_ENV=production npm run deploy:docs",
"release:major": "npm run prerelease && ta-script npm/release.sh major",
"release:minor": "npm run prerelease && ta-script npm/release.sh minor",
"release:patch": "npm run prerelease && ta-script npm/release.sh patch",
"prestart": "npm run satisfied -s -- --fix",
"start": "npm run docs",
"lint:fix": "yarn lint -- --fix",
"prerelease": "yarn lint && yarn tsd:lint && npm test && cross-env NODE_ENV=production yarn build",
"postrelease": "NODE_ENV=production yarn deploy:docs",
"release:major": "yarn prerelease && ta-script npm/release.sh major",
"release:minor": "yarn prerelease && ta-script npm/release.sh minor",
"release:patch": "yarn prerelease && ta-script npm/release.sh patch",
"prestart": "yarn satisfied -- --fix yarn",
"start": "yarn docs",
"satisfied": "satisfied --skip-invalid",
"pretest": "npm run satisfied -s && npm run build:dll",
"pretest": "yarn satisfied && yarn build:dll",
"test": "cross-env NODE_ENV=test node -r babel-register ./node_modules/karma/bin/karma start karma.conf.babel.js",
"test:watch": "npm run test --silent -- --no-single-run",
"test:watch": "yarn test -- --no-single-run",
"tsd": "gulp tsd",
"tsd:lint": "tslint './index.d.ts' './src/**/*.d.ts' './test/typings.d.ts'",
"tsd:lint:fix": "npm run -s tsd:lint -- --fix",
"tsd:test": "npm run tsd && tsc -p ./"
"tsd:lint:fix": "yarn tsd:lint -- --fix",
"tsd:test": "yarn tsd && tsc -p ./"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 83a5fa1

Please sign in to comment.