Skip to content

Commit 1db86e4

Browse files
committed
fix: Added support for installing web-ext on npm 2.x
1 parent 1f7a3ae commit 1db86e4

17 files changed

+21
-32
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ before_install:
88
- git remote set-branches origin master && git fetch
99
- git checkout master
1010
- git checkout -
11-
- npm install -g npm
11+
# On 0.12, we want to test with the default version of npm, otherwise
12+
# upgrade to the latest.
13+
- if [[ ${TRAVIS_NODE_VERSION:0:1} -gt "0" ]]; then
14+
npm install -g npm;
15+
fi
1216
script:
1317
- COVERAGE=y npm test
1418
# Run changelog-lint but only on newer versions of Node (because of syntax errors)

README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,13 @@ cross-platform way. Initially, it will provide a streamlined experience for deve
1919

2020
## Installation from npm
2121

22-
First, make sure your `npm` is up to date.
23-
You will need npm greater than version `3.0.0`:
24-
25-
npm install --global npm
26-
27-
If you're on Windows, you will also need to
28-
[follow these instructions](https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows)
29-
after upgrading npm.
30-
31-
Install `web-ext`:
32-
3322
npm install --global web-ext
3423

3524
## Installation from source
3625

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

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

4736
npm uninstall --global web-ext
4837

49-
Make sure `npm` is up to date:
50-
51-
npm install --global npm
52-
5338
Change into the source and install all dependencies:
5439

5540
git clone https://github.com/mozilla/web-ext.git

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"minimatch": "3.0.2",
5353
"mz": "2.4.0",
5454
"node-firefox-connect": "1.2.0",
55-
"sign-addon": "0.1.1",
55+
"sign-addon": "0.1.2",
5656
"source-map-support": "0.4.2",
5757
"stream-to-promise": "2.1.1",
5858
"tmp": "0.0.28",

src/cmd/sign.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* @flow */
22
import path from 'path';
3-
import fs from 'mz/fs';
3+
import {fs} from 'mz';
44
import {signAddon as defaultAddonSigner} from '../util/es6-modules';
55

66
import defaultBuilder from './build';

src/firefox/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import defaultFxRunner from 'fx-runner/lib/run';
55
import FirefoxProfile, {copyFromUserProfile as defaultUserProfileCopier}
66
from 'firefox-profile';
77
import streamToPromise from 'stream-to-promise';
8-
import fs from 'mz/fs';
8+
import {fs} from 'mz';
99

1010
import isDirectory from '../util/is-directory';
1111
import {promisify} from '../util/es6-modules';

src/util/artifacts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* @flow */
2-
import fs from 'mz/fs';
2+
import {fs} from 'mz';
33
import {WebExtError, onlyErrorsWithCode} from '../errors';
44
import {createLogger} from './logger';
55

src/util/is-directory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* @flow */
2-
import fs from 'mz/fs';
2+
import {fs} from 'mz';
33
import {onlyErrorsWithCode} from '../errors';
44

55

src/util/manifest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* @flow */
22
import path from 'path';
33

4-
import fs from 'mz/fs';
4+
import {fs} from 'mz';
55
import {InvalidManifest} from '../errors';
66
import {createLogger} from './logger';
77

tests/test-cmd/test.build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* @flow */
2-
import fs from 'mz/fs';
2+
import {fs} from 'mz';
33
import path from 'path';
44
import {it, describe} from 'mocha';
55
import {assert} from 'chai';

tests/test-cmd/test.sign.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* @flow */
22
import path from 'path';
33
import copyDir from 'copy-dir';
4-
import fs from 'mz/fs';
4+
import {fs} from 'mz';
55
import {describe, it} from 'mocha';
66
import {assert} from 'chai';
77
import sinon from 'sinon';

0 commit comments

Comments
 (0)