Skip to content

Commit

Permalink
Changed all the occurences from npm to yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Rey Lopez committed Jan 3, 2017
1 parent 4649cc1 commit b7cdc6f
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ install:
- nvm install 6.9.2
- nvm use 6.9.2
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.8.1
- yarn install
- yarn install --no-progress

# Clones WordPress and configures our testing environment.
before_script:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ If you'd just like to check out the latest beta release and not contribute code

If you'd just like to check out the latest code and/or wish to contribute code, then perform the following:

* Ensure you have `git`, `node`, and `npm` installed on the target machine/server. For maximum compatibility we recommend `node` version `6.9.0` and `npm` version 3+
* Ensure you have `git`, `node`, and `yarn` installed on the target machine/server. For maximum compatibility we recommend `node` version `6.9.2` and `yarn` version `0.18.1+`
* Clone this repository into the `plugins` folder of the WordPress installation.
* Run `npm install` to set up all the dependencies
* Run `yarn` to set up all the dependencies
* You now have two choices:
* For Development: Add the following to your `wp-config.php` file: `define( 'WOOCOMMERCE_CONNECT_DEV_SERVER_URL', 'http://localhost:8085/' );` and then Run `npm start` which will start a webpack dev server at `localhost:8085`, complete with hot reloading whenever you make changes. You will need to keep the `npm start` task running while developing. You can press `ctrl+c` to exit this process.
* For testing or pre-production use: Run `npm run dist` which will build the files into the `dist` folder, and will be loaded by the plugin without any additional configuration
Expand Down
5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const baseWebpackConfig = require( './webpack.config' );
const path = require( 'path' );
const escapeStringRegexp = require( 'escape-string-regexp' );
const argv = require( 'yargs' ).argv;

const testDirMatcher = new RegExp( escapeStringRegexp( path.resolve( __dirname, 'client' ) ) + '.*' + escapeStringRegexp( path.sep + 'test' + path.sep ) );

// Run single test: npm test --test=FILE_OR_GLOB
const testFile = (process.env.npm_config_test) ? process.env.npm_config_test : 'client/test/runner.js';
// To run single test: yarn test -- --test=FILE_OR_GLOB
const testFile = argv.test || 'client/test/runner.js';

module.exports = function( config ) {
config.set({
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"start": "cross-env NODE_ENV=development webpack-dev-server --hot --inline --watch --content-base dist --port 8085",
"dist": "cross-env NODE_ENV=production webpack --config webpack.production.config.js",
"eslint": "eslint tasks/ client/",
"test": "karma start --single-run --no-auto-watch && npm run eslint",
"test": "karma start --single-run --no-auto-watch && yarn run eslint",
"test-watch": "karma start --auto-watch --no-single-run",
"release": "node tasks/release.js",
"i18n": "npm run dist && node tasks/i18n"
"i18n": "yarn run dist && node tasks/i18n"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -37,9 +37,10 @@
"karma-webpack": "^1.7.0",
"mocha": "^2.5.3",
"mocha-loader": "^0.7.1",
"react-addons-test-utils": "~15.1.0",
"react-addons-test-utils": "~15.3.0",
"redbox-react": "^1.2.2",
"webpack-dev-server": "^1.14.1"
"webpack-dev-server": "^1.14.1",
"yargs": "^6.6.0"
},
"dependencies": {
"archiver": "^1.0.0",
Expand Down Expand Up @@ -75,8 +76,8 @@
"object-path-immutable": "^0.4.0",
"objectpath": "^1.2.1",
"postcss-loader": "^0.9.1",
"react": "~15.1.0",
"react-dom": "~15.1.0",
"react": "~15.3.0",
"react-dom": "~15.3.0",
"react-redux": "^4.4.1",
"redux": "^3.3.1",
"redux-thunk": "^2.1.0",
Expand Down
4 changes: 2 additions & 2 deletions tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ confirm( colors.cyan( 'Howdy! This script is going to create a release folder wi
process.exit( 0 );
}

// run npm dist
exec( 'npm run dist' );
// run yarn dist
exec( 'yarn run dist' );

// start with a clean release folder
rm( '-rf', releaseFolder );
Expand Down
118 changes: 50 additions & 68 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -893,13 +893,6 @@ babel-plugin-transform-flow-strip-types@^6.3.13:
babel-plugin-syntax-flow "^6.18.0"
babel-runtime "^6.0.0"

[email protected]:
version "1.1.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-imports/-/babel-plugin-transform-imports-1.1.0.tgz#fd7ca83a3cd8b1b8f1e964c867d80c96fdcb5f69"
dependencies:
babel-types "^6.6.0"
lodash.kebabcase "^4.0.1"

babel-plugin-transform-object-rest-spread@^6.16.0, babel-plugin-transform-object-rest-spread@^6.3.13:
version "6.20.2"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.20.2.tgz#e816c55bba77b14c16365d87e2ae48c8fd18fc2e"
Expand Down Expand Up @@ -1120,7 +1113,7 @@ babel-traverse@^6.0.20, babel-traverse@^6.16.0, babel-traverse@^6.18.0, babel-tr
invariant "^2.2.0"
lodash "^4.2.0"

babel-types@^6.0.19, babel-types@^6.13.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.20.0, babel-types@^6.21.0, babel-types@^6.6.0, babel-types@^6.8.0, babel-types@^6.9.0, babel-types@^6.9.1:
babel-types@^6.0.19, babel-types@^6.13.0, babel-types@^6.16.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.20.0, babel-types@^6.21.0, babel-types@^6.8.0, babel-types@^6.9.0, babel-types@^6.9.1:
version "6.21.0"
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2"
dependencies:
Expand All @@ -1143,10 +1136,6 @@ babylon@^6.0.18, babylon@^6.11.0, babylon@^6.13.0, babylon@^6.7.0, babylon@^6.8.
version "6.14.1"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.14.1.tgz#956275fab72753ad9b3435d7afe58f8bf0a29815"

babylon@~5.8.3:
version "5.8.38"
resolved "https://registry.yarnpkg.com/babylon/-/babylon-5.8.38.tgz#ec9b120b11bf6ccd4173a18bf217e60b79859ffd"

[email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947"
Expand Down Expand Up @@ -2209,13 +2198,6 @@ [email protected]:
version "1.4.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf"

[email protected], doctrine@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63"
dependencies:
esutils "^2.0.2"
isarray "^1.0.0"

doctrine@^1.2.2:
version "1.5.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa"
Expand Down Expand Up @@ -2920,7 +2902,7 @@ [email protected]:
promise "^7.0.3"
whatwg-fetch "^0.9.0"

fbjs@^0.8.0, fbjs@^0.8.1, fbjs@^0.8.3, fbjs@^0.8.4, fbjs@^0.8.6:
fbjs@^0.8.1, fbjs@^0.8.3, fbjs@^0.8.4, fbjs@^0.8.6:
version "0.8.8"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.8.tgz#02f1b6e0ea0d46c24e0b51a2d24df069563a5ad6"
dependencies:
Expand Down Expand Up @@ -3157,10 +3139,6 @@ function-bind@^1.0.2:
version "1.1.0"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"

[email protected]:
version "2.6.1"
resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-2.6.1.tgz#d118e00f9a859f7b354ed4f7740214249e32a57a"

gather-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b"
Expand Down Expand Up @@ -3235,9 +3213,9 @@ get-stdin@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"

get-video-id@2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/get-video-id/-/get-video-id-2.1.0.tgz#717217340c6263f59248d406c8f7dddbcfa9af72"
get-video-id@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/get-video-id/-/get-video-id-2.0.0.tgz#b2fe9389031b10082733073f7241350f104ce229"

getpass@^0.1.1:
version "0.1.6"
Expand Down Expand Up @@ -3980,8 +3958,8 @@ [email protected], isarray@^1.0.0, isarray@~1.0.0:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"

isbinaryfile@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.1.tgz#6e99573675372e841a0520c036b41513d783e79e"
version "3.0.2"
resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.2.tgz#4a3e974ec0cba9004d3fc6cde7209ea69368a621"

isexe@^1.1.1:
version "1.1.2"
Expand Down Expand Up @@ -4732,10 +4710,6 @@ lodash.isarray@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"

lodash.kebabcase@^4.0.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"

lodash.keys@^3.0.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
Expand Down Expand Up @@ -4824,11 +4798,7 @@ lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.3.tgz#c92393d976793eee5ba4edb583cf8eae35bd9bfb"

lru-cache@2:
version "2.7.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"

[email protected]:
lru-cache@2, [email protected]:
version "2.2.4"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d"

Expand Down Expand Up @@ -5605,6 +5575,10 @@ path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"

[email protected]:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-parser/-/path-parser-1.0.2.tgz#8df96a2705dbbedeab8758db7018b65124cd489e"

[email protected]:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
Expand Down Expand Up @@ -6154,9 +6128,9 @@ [email protected]:
version "15.4.0"
resolved "https://registry.yarnpkg.com/react-addons-shallow-compare/-/react-addons-shallow-compare-15.4.0.tgz#17b2cced1928937bbcdb4832fb200bc34bd47871"

react-addons-test-utils@~15.1.0:
version "15.1.0"
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.1.0.tgz#ed9ab2a99ecf04acc99eeea10b308105eb3b183c"
react-addons-test-utils@~15.3.0:
version "15.3.2"
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.3.2.tgz#c09a44f583425a4a9c1b38444d7a6c3e6f0f41f6"

[email protected]:
version "15.4.0"
Expand All @@ -6172,18 +6146,6 @@ [email protected]:
dependencies:
react-is-deprecated "0.1.2"

[email protected]:
version "2.13.0"
resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-2.13.0.tgz#7fcc4a3104ea8d4fd428383ba38df11166837be9"
dependencies:
async "^1.4.2"
babel-runtime "^6.9.2"
babylon "~5.8.3"
commander "^2.9.0"
doctrine "^2.0.0"
node-dir "^0.1.10"
recast "^0.11.5"

[email protected]:
version "15.4.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.4.0.tgz#6a97a69000966570db48c746bc4b7b0ca50d1534"
Expand All @@ -6192,9 +6154,9 @@ [email protected]:
loose-envify "^1.1.0"
object-assign "^4.1.0"

"react-dom@^0.14.3 || ^15.1.0", react-dom@~15.1.0:
version "15.1.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.1.0.tgz#d0c2b24c8b47a41a2b9ec766662d4e686f353153"
"react-dom@^0.14.3 || ^15.1.0", react-dom@~15.3.0:
version "15.3.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.3.2.tgz#c46b0aa5380d7b838e7a59c4a7beff2ed315531f"

[email protected]:
version "0.1.2"
Expand Down Expand Up @@ -6246,11 +6208,11 @@ [email protected]:
dom-helpers "^2.4.0"
raf "^3.1.0"

"[email protected] || ^15.1.0", "react@^0.14.3 || ^15.1.0", react@~15.1.0:
version "15.1.0"
resolved "https://registry.yarnpkg.com/react/-/react-15.1.0.tgz#5f7a9f085a00509898efd2b24cb12ea1dfaf8b40"
"[email protected] || ^15.1.0", "react@^0.14.3 || ^15.1.0", react@~15.3.0:
version "15.3.2"
resolved "https://registry.yarnpkg.com/react/-/react-15.3.2.tgz#a7bccd2fee8af126b0317e222c28d1d54528d09e"
dependencies:
fbjs "^0.8.0"
fbjs "^0.8.4"
loose-envify "^1.1.0"
object-assign "^4.1.0"

Expand Down Expand Up @@ -6362,7 +6324,7 @@ recast@^0.10.1:
private "~0.1.5"
source-map "~0.5.0"

recast@^0.11.5, recast@~0.11.12:
recast@~0.11.12:
version "0.11.18"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.18.tgz#07af6257ca769868815209401d4d60eef1b5b947"
dependencies:
Expand Down Expand Up @@ -6557,14 +6519,10 @@ resolve-from@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"

[email protected]:
[email protected], resolve@^1.1.6:
version "1.1.7"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"

resolve@^1.1.6:
version "1.2.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c"

restore-cursor@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
Expand Down Expand Up @@ -7074,7 +7032,7 @@ strict-uri-encode@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"

string-width@^1.0.1:
string-width@^1.0.1, string-width@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
dependencies:
Expand Down Expand Up @@ -7880,7 +7838,7 @@ wordwrap@~0.0.2:

"wp-calypso@github:automattic/wp-calypso":
version "0.17.0"
resolved "https://codeload.github.com/automattic/wp-calypso/tar.gz/00dba67486ae57eda2de2f69dd7dd188c5a0caa3"
resolved "https://codeload.github.com/automattic/wp-calypso/tar.gz/2bc6d869eb1e955bab86622fef6ede087e10855f"
dependencies:
async "0.9.0"
atob "1.1.2"
Expand Down Expand Up @@ -8133,6 +8091,12 @@ yargs-parser@^2.4.1:
camelcase "^3.0.0"
lodash.assign "^4.0.6"

yargs-parser@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c"
dependencies:
camelcase "^3.0.0"

yargs@^3.8.0, yargs@~3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
Expand Down Expand Up @@ -8161,6 +8125,24 @@ yargs@^4.7.1:
y18n "^3.2.1"
yargs-parser "^2.4.1"

yargs@^6.6.0:
version "6.6.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208"
dependencies:
camelcase "^3.0.0"
cliui "^3.2.0"
decamelize "^1.1.1"
get-caller-file "^1.0.1"
os-locale "^1.4.0"
read-pkg-up "^1.0.1"
require-directory "^2.1.1"
require-main-filename "^1.0.1"
set-blocking "^2.0.0"
string-width "^1.0.2"
which-module "^1.0.0"
y18n "^3.2.1"
yargs-parser "^4.2.0"

[email protected]:
version "0.1.2"
resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419"
Expand Down

0 comments on commit b7cdc6f

Please sign in to comment.