Skip to content

Commit

Permalink
fix: Added support for installing web-ext on npm 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar303 committed Jul 14, 2016
1 parent 1f7a3ae commit 1db86e4
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 32 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ before_install:
- git remote set-branches origin master && git fetch
- git checkout master
- git checkout -
- npm install -g npm
# On 0.12, we want to test with the default version of npm, otherwise
# upgrade to the latest.
- if [[ ${TRAVIS_NODE_VERSION:0:1} -gt "0" ]]; then
npm install -g npm;
fi
script:
- COVERAGE=y npm test
# Run changelog-lint but only on newer versions of Node (because of syntax errors)
Expand Down
17 changes: 1 addition & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,13 @@ cross-platform way. Initially, it will provide a streamlined experience for deve

## Installation from npm

First, make sure your `npm` is up to date.
You will need npm greater than version `3.0.0`:

npm install --global npm

If you're on Windows, you will also need to
[follow these instructions](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows)
after upgrading npm.

Install `web-ext`:

npm install --global web-ext

## Installation from source

You'll need:
* [Node.js](https://nodejs.org/en/), 0.12 or higher
* [npm](https://www.npmjs.com/), 3.0.0 or higher
* [npm](https://www.npmjs.com/), 3.0.0 or higher is recommended

Optionally, you may like:
* [nvm](https://github.com/creationix/nvm), which helps manage node versions
Expand All @@ -46,10 +35,6 @@ you may need to uninstall it first:

npm uninstall --global web-ext

Make sure `npm` is up to date:

npm install --global npm

Change into the source and install all dependencies:

git clone https://github.com/mozilla/web-ext.git
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"minimatch": "3.0.2",
"mz": "2.4.0",
"node-firefox-connect": "1.2.0",
"sign-addon": "0.1.1",
"sign-addon": "0.1.2",
"source-map-support": "0.4.2",
"stream-to-promise": "2.1.1",
"tmp": "0.0.28",
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/sign.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */
import path from 'path';
import fs from 'mz/fs';
import {fs} from 'mz';
import {signAddon as defaultAddonSigner} from '../util/es6-modules';

import defaultBuilder from './build';
Expand Down
2 changes: 1 addition & 1 deletion src/firefox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import defaultFxRunner from 'fx-runner/lib/run';
import FirefoxProfile, {copyFromUserProfile as defaultUserProfileCopier}
from 'firefox-profile';
import streamToPromise from 'stream-to-promise';
import fs from 'mz/fs';
import {fs} from 'mz';

import isDirectory from '../util/is-directory';
import {promisify} from '../util/es6-modules';
Expand Down
2 changes: 1 addition & 1 deletion src/util/artifacts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @flow */
import fs from 'mz/fs';
import {fs} from 'mz';
import {WebExtError, onlyErrorsWithCode} from '../errors';
import {createLogger} from './logger';

Expand Down
2 changes: 1 addition & 1 deletion src/util/is-directory.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @flow */
import fs from 'mz/fs';
import {fs} from 'mz';
import {onlyErrorsWithCode} from '../errors';


Expand Down
2 changes: 1 addition & 1 deletion src/util/manifest.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */
import path from 'path';

import fs from 'mz/fs';
import {fs} from 'mz';
import {InvalidManifest} from '../errors';
import {createLogger} from './logger';

Expand Down
2 changes: 1 addition & 1 deletion tests/test-cmd/test.build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @flow */
import fs from 'mz/fs';
import {fs} from 'mz';
import path from 'path';
import {it, describe} from 'mocha';
import {assert} from 'chai';
Expand Down
2 changes: 1 addition & 1 deletion tests/test-cmd/test.sign.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */
import path from 'path';
import copyDir from 'copy-dir';
import fs from 'mz/fs';
import {fs} from 'mz';
import {describe, it} from 'mocha';
import {assert} from 'chai';
import sinon from 'sinon';
Expand Down
2 changes: 1 addition & 1 deletion tests/test-firefox/test.firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import FirefoxProfile from 'firefox-profile';

import * as firefox from '../../src/firefox';
import {onlyInstancesOf, WebExtError} from '../../src/errors';
import fs from 'mz/fs';
import {fs} from 'mz';
import {withTempDir} from '../../src/util/temp-dir';
import {TCPConnectError, fixturePath, fake, makeSureItFails} from '../helpers';
import {basicManifest, manifestWithoutApps} from '../test-util/test.manifest';
Expand Down
2 changes: 1 addition & 1 deletion tests/test-util/test.artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import path from 'path';
import {it, describe} from 'mocha';
import {assert} from 'chai';
import fs from 'mz/fs';
import {fs} from 'mz';

import {onlyInstancesOf, WebExtError} from '../../src/errors';
import {withTempDir} from '../../src/util/temp-dir';
Expand Down
2 changes: 1 addition & 1 deletion tests/test-util/test.is-directory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */
import path from 'path';
import fs from 'mz/fs';
import {fs} from 'mz';
import {assert} from 'chai';
import {describe, it} from 'mocha';

Expand Down
2 changes: 1 addition & 1 deletion tests/test-util/test.manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {assert} from 'chai';
import deepcopy from 'deepcopy';

import {onlyInstancesOf, InvalidManifest} from '../../src/errors';
import fs from 'mz/fs';
import {fs} from 'mz';
import getValidatedManifest, {getManifestId} from '../../src/util/manifest';
import {withTempDir} from '../../src/util/temp-dir';
import {makeSureItFails} from '../helpers';
Expand Down
2 changes: 1 addition & 1 deletion tests/test-util/test.temp-dir.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */
import {describe, it} from 'mocha';
import fs from 'mz/fs';
import {fs} from 'mz';
import {assert} from 'chai';

import {withTempDir, TempDir} from '../../src/util/temp-dir';
Expand Down
2 changes: 1 addition & 1 deletion tests/test.program.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */
import {describe, it} from 'mocha';
import path from 'path';
import fs from 'mz/fs';
import {fs} from 'mz';
import sinon from 'sinon';
import {assert} from 'chai';
import {spy} from 'sinon';
Expand Down
2 changes: 1 addition & 1 deletion tests/test.watcher.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* @flow */
import path from 'path';
import {it, describe} from 'mocha';
import fs from 'mz/fs';
import {fs} from 'mz';
import sinon from 'sinon';
import {assert} from 'chai';

Expand Down

0 comments on commit 1db86e4

Please sign in to comment.