Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use yarn workspaces. #415

Merged
merged 16 commits into from
Oct 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ node_modules/
.idea
packages/site/build
package-lock.json
yarn.lock
.DS_Store
.cache
public/
18 changes: 5 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ language: node_js
node_js:
- "8"

cache:
directories:
- node_modules

script: npm run test

before_install:
- npm install codecov
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"

install: yarn install --frozen-lockfile

before_script:
- npm run bootstrap
Expand All @@ -19,13 +18,6 @@ after_success:
- cat ./coverage/lcov.info | ./node_modules/codecov/bin/codecov

cache:
yarn: true
directories:
- node_modules
- packages/site/node_modules
- packages/react-emotion/node_modules
- packages/preact-emotion/node_modules
- packages/babel-plugin-emotion/node_modules
- packages/emotion-utils/node_modules
- packages/benchmarks/node_modules
- packages/emotion-server/node_modules
- packages/emotion/node_modules
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
workspaces-experimental true
16 changes: 9 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
## Prerequisites

[Node.js](http://nodejs.org/) >= v7 must be installed.
- [Node.js](http://nodejs.org/) >= v7 must be installed.

- [Yarn](https://yarnpkg.com/en/docs/install)

## Installation

- Running `npm install` in the module's root directory will install everything you need for development.
- Running `yarn` in the module's root directory will install everything you need for development.
- Run `lerna bootstrap` in the module's root directory

## Running Tests

- `npm test` will run the tests once.
- `yarn test` will run the tests once.

- `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`.
- `yarn test:coverage` will run the tests and produce a coverage report in `coverage/`.

- `npm run test:watch` will run the tests on every change.
- `yarn test:watch` will run the tests on every change.

## Building

- `npm run build` will build the module for publishing to npm.
- `yarn build` will build the module for publishing to npm.

- `npm run clean` will delete built resources.
- `yarn clean` will delete built resources.
7 changes: 3 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"lerna": "2.2.0",
"packages": [
"packages/*"
],
"changelog": {
"repo": "emotion-js/emotion",
"labels": {
Expand All @@ -13,5 +10,7 @@
"Tag: Internal": ":house: Internal"
}
},
"version": "8.0.8"
"version": "8.0.8",
"npmClient": "yarn",
"useWorkspaces": true
}
3 changes: 3 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
command = "rm -rf /opt/buildhome/.yarn && curl -o- -L https://yarnpkg.com/install.sh | bash && export PATH=\"$HOME/.yarn/bin:$PATH\" && yarn && npm run bootstrap && npm run build && npm run build:site"
publish = "packages/site/build"
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"bundlesize": "^0.13.2",
"codecov": "^2.3.1",
"css": "^2.2.1",
"cssjanus": "^1.2.0",
"enzyme": "^2.9.1",
Expand Down Expand Up @@ -145,6 +146,9 @@
"<rootDir>/packages/emotion-utils/src/stylis.js"
]
},
"workspaces": [
"packages/*"
],
"bugs": {
"url": "https://github.com/tkh44/emotion/issues"
},
Expand Down
Loading