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

Move from npm cli -> yarn #457

Merged
merged 8 commits into from
Nov 11, 2016
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: 1 addition & 0 deletions .buildpacks
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
https://github.com/rcaught/heroku-buildpack-cmake#e4e2c9e
https://github.com/alexcrichton/heroku-buildpack-rust#ca218b5
https://github.com/heroku/heroku-buildpack-nodejs#yarn
https://github.com/tonycoco/heroku-buildpack-ember-cli#3be749b
https://github.com/ryandotsmith/nginx-buildpack.git#af813ba
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,26 @@ sudo: false

cache:
directories:
- node_modules
- $HOME/.yarn-cache

before_install:
- nvm install 0.12
- nvm install 4.6.0
- export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
- "npm config set spin false"
- "npm install -g npm@^2"
- npm config set spin false
- npm install -g yarn

install:
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
- npm install -g bower
- npm install
- bower install
- yarn
- yarn run bower install

before_script:
- psql -c 'create database cargo_registry_test;' -U postgres

script:
- cargo build
- cargo test
- npm test
- yarn run test

after_success:
- travis-cargo coveralls --no-sudo
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ This project is built on ember-cli and cargo, visit

## Working on the Frontend

```
```bash
git clone https://github.com/rust-lang/crates.io.git
cd crates.io/
npm install
npm install -g ember-cli bower
bower install
npm install -g yarn # if you don't have yarn
yarn
yarn run bower install
```

The website's frontend is built with [Ember.js](http://emberjs.com/). This
makes it possible to work on the frontend without running a local backend.
To start the frontend run:

```bash
npm run start:staging
yarn run start:staging
```

This will run a local frontend using the staging backend (hosted on Heroku at
Expand All @@ -37,9 +37,9 @@ specify arguments to `npm start`. For example you can set the proxy to
To do this, run:

```bash
npm start -- --proxy https://crates.io
yarn start -- --proxy https://crates.io
# or
npm run start:live
yarn run start:live
```

**Note**: This requires npm 2.
Expand All @@ -52,8 +52,8 @@ phantomjs-prebuilt`.
Then run the tests with:

```
ember test
ember test --server
yarn run ember test
yarn run ember test --server
```

## Working on the Backend
Expand Down Expand Up @@ -97,7 +97,7 @@ follows:
6. **Optionally** start a local frontend:

```
npm run start:local
yarn run start:local
```

### Running Tests
Expand Down
8 changes: 4 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "cargo",
"dependencies": {
"Faker": "~3.0.0",
"ember": "~2.6.0",
"ember-cli-moment-shim": "~0.1.0",
"ember-cli-shims": "0.1.1",
"ember-cli-test-loader": "0.2.2",
"ember-load-initializers": "0.1.7",
Expand All @@ -10,13 +12,11 @@
"ember-resolver": "~0.1.20",
"jquery": "1.11.3",
"loader.js": "ember-cli/loader.js#3.4.0",
"qunit": "~1.20.0",
"ember-cli-moment-shim": "~0.1.0",
"lodash": "~3.7.0",
"moment": ">= 2.8.0",
"moment-timezone": ">= 0.1.0",
"normalize-css": "~3.0.3",
"pretender": "~1.1.0",
"lodash": "~3.7.0",
"Faker": "~3.0.0"
"qunit": "~1.20.0"
}
}
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@
"test": "tests"
},
"scripts": {
"build": "ember build",
"start": "ember server",
"start:local": "ember server --proxy http://127.0.0.1:8888",
"start:staging": "ember server --proxy https://staging-crates-io.herokuapp.com",
"start:live": "ember server --proxy https://crates.io",
"test": "ember test"
"build": "yarn run ember build",
"start": "yarn run ember server",
"start:local": "yarn run ember server --proxy http://127.0.0.1:8888",
"start:staging": "yarn run ember server --proxy https://staging-crates-io.herokuapp.com",
"start:live": "yarn run ember server --proxy https://crates.io",
"test": "yarn run ember test",
"ember": "ember"
},
"repository": "",
"engines": {
"node": ">= 0.10.0"
"node": "= 4.6.0"
},
"author": "",
"license": "MIT",
"devDependencies": {
"bower": "^1.7.9",
"broccoli-asset-rev": "^2.4.2",
"ember-ajax": "^2.0.1",
"ember-cli": "2.8.0",
Expand Down
Loading