aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
Commit message (Collapse)AuthorAgeFilesLines
* Enable indent linting via ESLint (#6936)Whymarrh Whitby2019-08-011-36/+36
| | | | | | * Enable indent linting via ESLint * yarn run lint:fix
* Serve CSS as an external file (#6894)Mark Stacey2019-07-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CSS is now served as an external file instead of being injected. This was done to improve performance. Ideally we would come to a middle ground between this and the former behaviour by injecting only the CSS that was required for the initial page load, then lazily loading the rest. However that change would be more complex. The hope was that making all CSS external would at least be a slight improvement. Performance metrics were collected before and after this change to determine whether this change actually helped. The metrics collected were the timing events provided by Chrome DevTools: * DOM Content Loaded (DCL) [1] * Load (L) [2] * First Paint (FP) [3] * First Contentful Paint (FCP) [3] * First Meaningful Paint (FMP) [3] Here are the results (units in milliseconds): Injected CSS: | Run | DCL | L | FP | FCP | FMP | | :--- | ---: | ---: | ---: | ---: | ---: | | 1 | 1569.45 | 1570.97 | 1700.36 | 1700.36 | 1700.36 | | 2 | 1517.37 | 1518.84 | 1630.98 | 1630.98 | 1630.98 | | 3 | 1603.71 | 1605.31 | 1712.56 | 1712.56 | 1712.56 | | 4 | 1522.15 | 1523.72 | 1629.3 | 1629.3 | 1629.3 | | **Min** | 1517.37 | 1518.84 | 1629.3 | 1629.3 | 1629.3 | | **Max** | 1603.71 | 1605.31 | 1712.56 | 1712.56 | 1712.56 | | **Mean** | 1553.17 | 1554.71 | 1668.3 | 1668.3 | 1668.3 | | **Std. dev.** | 33.41 | 33.43 | 38.16 | 38.16 | 38.16 | External CSS: | Run | DCL | L | FP | FCP | FMP | | :--- | ---: | ---: | ---: | ---: | ---: | | 1 | 1595.4 | 1598.91 | 284.97 | 1712.86 | 1712.86 | | 2 | 1537.55 | 1538.99 | 199.38 | 1633.5 | 1633.5 | | 3 | 1571.28 | 1572.74 | 268.65 | 1677.03 | 1677.03 | | 4 | 1510.98 | 1512.33 | 206.72 | 1607.03 | 1607.03 | | **Min** | 1510.98 | 1512.33 | 199.38 | 1607.03 | 1607.03 | | **Max** | 1595.4 | 1598.91 | 284.97 | 1712.86 | 1712.86 | | **Mean** | 1553.8025 | 1555.7425 | 239.93 | 1657.605 | 1657.605 | | **Std. dev.** | 29.5375 | 30.0825 | 36.88 | 37.34 | 37.34 | Unfortunately, using an external CSS file made no discernible improvement to the overall page load time. DCM and L were practically identical, and FCP and FMP were marginally better (well within error margins). However, the first paint time was _dramatically_ improved. This change seems worthwhile for the first paint time improvement alone. It also allows us to delete some code and remove a dependency. The old `css.js` module included two third-party CSS files as well, so those have been imported into the main Sass file. This was easier than bundling them in the gulpfile. The resulting CSS bundle needs to be served from the root because we're using a few `@include` rules that make this assumption. We could move this under `/css/` if desired, but we'd need to update each of these `@include` rules. Relates to #6646 [1]: https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded [2]: https://developer.mozilla.org/en-US/docs/Web/Events/load [3]: https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics
* Set minimum browser version in manifest (#6877)Mark Stacey2019-07-191-0/+1
| | | | | | | Set the minimum browser version supported in the extension manifest. Currently we only ship the extension on Chrome and Firefox, so the minimum version has been set for those two browsers. Relates to #6805
* Add React and Redux DevTools (#6793)Whymarrh Whitby2019-07-111-1/+5
| | | | | | | | | * Add React and Redux DevTools * Conditionally load react-devtools * Add start:dev npm script to run the app with devtools Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
* Remove `disc` (#6801)Mark Stacey2019-07-041-38/+0
| | | | | The `disc` gulp command no longer works. I wasn't able to fix this easily, so instead it has been removed. We can probably find something better to replace it with.
* Move Browserify transforms to gulpfile (#6768)Mark Stacey2019-07-021-0/+2
| | | | | | | | | | | | The flat tests also rely upon these transformations, yet invoke browserify from the command line rather than using the gulpfile. The transformations have been specified on the command line for those instead. Of course it's not ideal to have the same transformations listed in two different places, but the plan is to delete the flat tests soon anyway, so this should suffice until then. Closes #4538
* Use inline source maps in development (#6754)Mark Stacey2019-06-271-4/+11
| | | | | | | | | | | | There is currently a bug in chrome that prevents reading source maps from a local file [0]. This was preventing Chrome DevTools from using our JavaScript source maps, where were saved as `.map` files. To work around this problem the source maps are now generated inline, which seems to work fine. The only other browser I tested this with was Firefox, which works both before and after this change. [0]: https://bugs.chromium.org/p/chromium/issues/detail?id=931675
* Add brave as a platform type for MetaMaskBrian R. Bondy2019-06-201-0/+2
|
* Check for unused function arguments (#6583)Whymarrh Whitby2019-05-091-1/+1
| | | | | | | | | | * eslint: Check for unused function arguments * eslint: Ignore unused '_' in argument list Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly * Remove and rename unused arguments
* ci: Add build:test Gulp task for e2e buildWhymarrh Whitby2019-03-291-0/+14
|
* Default to localhost network when running e2e testsDan Miller2019-03-291-2/+5
|
* Use webRequest to cancel all requests to infura in e2e tests.Dan Miller2019-03-291-0/+36
|
* mascara - remove from project (#6283)kumavis2019-03-121-53/+0
|
* Feature Flag + Mobile Sync (#5955)Dan Finlay2019-02-261-0/+3
|
* Add c3 and d3 to the separate dependencies bundle.Dan Miller2018-12-041-0/+2
|
* Merge branch 'develop' into trezor-v5brunobar792018-11-141-1/+45
|\
| * Bundle some ui dependencies separately to limit the build size of ui.jsDan Miller2018-11-011-1/+45
| |
* | fix merge conflictsbrunobar792018-10-211-1/+3
|\|
| * Set `NODE_ENV` when generating bundler (#4983)William Chong2018-10-191-1/+3
| |
* | fix conflictsbrunobar792018-10-171-1/+10
|\|
| * Merge pull request #5053 from hahnmichaelf/esdb-supportThomas Huang2018-09-271-0/+1
| |\ | | | | | | Link to ESDB in local phishing.html
| | * fix for lint-testhahnmichaelf2018-08-141-1/+1
| | |
| | * fixed nameshahnmichaelf2018-08-141-1/+1
| | |
| | * Re-added GA scripthahnmichaelf2018-08-141-1/+1
| | |
| | * base - working. fixes #4774hahnmichaelf2018-08-131-0/+1
| | |
| * | remove css sourcemaps in prod buildsbrunobar792018-09-261-1/+9
| |/
* / trezor v5 working on firefoxbrunobar792018-08-051-0/+4
|/
* eslint --fix .brunobar792018-07-031-39/+39
|
* remove gulp eslint and cleanup gulpfilebrunobar792018-07-031-29/+0
|
* Merge pull request #4059 from MetaMask/i-4033-seed-wordskumavis2018-05-011-1/+1
|\ | | | | Use new design for Reveal Seed screen. Persist seed words only in the first time flow.
| * Use new design for reveal seed screen. Persist seed words only in first time ↵Alexander Tseung2018-04-231-1/+1
| | | | | | | | flow
* | build - minify via gulp-uglify-es instead of uglifyifykumavis2018-04-281-10/+10
|/
* build - correctly set METAMASK_ENV via envifykumavis2018-04-041-9/+7
|
* Merge branch 'master' of github.com:MetaMask/metamask-extension into build-perfkumavis2018-04-031-2/+4
|\
| * Merge branch 'master' into lint-sys-fixkumavis2018-04-031-2/+4
| |\
| | * lint - lint json files in app/kumavis2018-04-031-2/+4
| | |
| * | lint - include old uikumavis2018-04-031-2/+2
| |/
* / build - use uglifyify and gulp-multi-process for better performancekumavis2018-03-311-12/+17
|/
* build - properly set GULP_METAMASK_DEBUG on devkumavis2018-03-311-6/+5
|
* mascara - server - serve bundles from distkumavis2018-03-301-1/+1
|
* build - split primary tasks into metamask + extension * dev + buildkumavis2018-03-301-7/+55
|
* build - cleanup commented codekumavis2018-03-301-27/+0
|
* build - fix scss + js reloadkumavis2018-03-301-8/+12
|
* build - fix copy devModekumavis2018-03-301-32/+31
|
* build - refactor scss compilation into single configkumavis2018-03-301-18/+63
|
* build - dev - fix js build orderkumavis2018-03-301-1/+1
|
* build - dev - run js tasks in parallel and set watch flagkumavis2018-03-301-3/+4
|
* build - refactor copy and copy:watch (renamed to copy:dev)kumavis2018-03-291-44/+62
|
* build - extension - move js files to toplevelkumavis2018-03-291-3/+3
|
* build - mascara - copy proxy htmlkumavis2018-03-291-4/+13
|
* build - refactor js build processkumavis2018-03-291-43/+66
|
* build - fix mascara sourcemaps destkumavis2018-03-291-49/+46
|
* build - remove copy debugkumavis2018-03-291-1/+1
|
* build - remove deprecated deps taskkumavis2018-03-291-12/+0
|
* build - refactor copy taskskumavis2018-03-291-26/+46
|
* build - refactor build task generators + add mascara to standard build phasekumavis2018-03-291-86/+116
|
* build - fix sourcemaps for devkumavis2018-03-241-1/+1
|
* build - always generate sourcemapskumavis2018-03-241-2/+2
|
* build - for build, write sourcemaps to dist/sourcemapskumavis2018-03-241-1/+1
|
* build - always create sourcemapskumavis2018-03-241-2/+2
|
* Revert "Issue 3505 | Transpile to ES5"Thomas Huang2018-03-221-5/+1
|
* Issue 3505 | Transpile to ES5Ryan Rowland2018-03-201-1/+5
|
* Fix inpage provider name regressionDan Finlay2018-03-031-1/+3
| | | | | | Fixes #3372 by not minifying the name of our inpage provider, which some people were using to identify MetaMask (not our preferred, supported method of web3.currentProvider.isMetaMask).
* Merge branch 'master' into uatDan2018-02-081-1/+1
|\
| * Remove deps from build processDan Finlay2018-02-021-1/+1
| | | | | | | | Was running out of stdout memory, preventing me from building.
* | Merge branch 'uat' into newmasterChi Kei Chan2018-01-201-7/+63
|\ \ | |/ |/|
| * Merge branch 'uat' into uat-master-011618Alexander Tseung2018-01-171-7/+63
| |\
| | * [NewUI-flat] Fix gulp build (#2975)Dan J Miller2018-01-161-9/+21
| | | | | | | | | | | | | | | | | | * Only run uglify when building for prod; set environment when building for prod; use gulp-uglify-es. * Revert change of dist script.
| | * [NewUI] Build mascara with uglification and gzipping. (#2735)Dan J Miller2018-01-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | * Adds uglification and gzipping. * Build mascara with uglification and gzipping. * Remove gzipping from extension build.
| | * Merge branch 'master' into NewUI-flat-merge-with-masterDan2017-12-071-1/+7
| | |
| | * Merge branch 'master' into NewUI-flatChi Kei Chan2017-10-251-1/+14
| | |\
| | * \ Merge branch 'NewUI-flat' into mergeChi Kei Chan2017-10-191-10/+41
| | |\ \
| | | * | Fixes lint errors and adds stylelint-config-standard to package.jsonDan2017-08-311-1/+2
| | | | |
| | | * | [WIP] Add packages and tasks for linting scsssdtsui2017-08-141-1/+21
| | | | |
| | | * | Merge branch 'master' into NewUI-flatkumavis2017-08-091-17/+26
| | | |\ \
| | | * \ \ Merge branch 'master' into feat/mm-ui-5sdtsui2017-08-071-1/+0
| | | |\ \ \
| | | * | | | Clean up gulpfilesdtsui2017-08-071-22/+7
| | | | | | |
| | | * | | | Use 4.x pattern for watching scsssdtsui2017-08-071-2/+5
| | | | | | |
| | | * | | | Cleanup css and gulpfile post-migrationsdtsui2017-08-071-15/+13
| | | | | | |
| | | * | | | Migrate from css to scss + autoprefixersdtsui2017-08-071-2/+26
| | | | | | |
| | | * | | | Remove responsive folder from gulpDan Finlay2017-07-261-1/+0
| | | | | | |
| | | * | | | Merge branch 'master' into NewUIDan Finlay2017-07-211-0/+1
| | | |\ \ \ \
| | | * | | | | Get duplicate UI template workingDan Finlay2017-07-041-0/+1
| | | | | | | |
* | | | | | | | lint - ignore vendor jskumavis2018-01-181-1/+1
| | | | | | | |
* | | | | | | | lint - ignore vendor jskumavis2018-01-181-1/+1
|/ / / / / / /
* | | | | | | build - add 'deps' step that records output of 'npm ls' into buildkumavis2018-01-111-1/+15
| | | | | | |
* | | | | | | Ensure Opera build excludes chromereload fileDan Finlay2017-11-221-1/+7
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | Fixes #2504
* | | | | | Add lint:fix command to gulp and npm-scriptsDaijiro Wachi2017-10-221-0/+7
|/ / / / /
* | | | | Increase build readabilityDan Finlay2017-10-131-2/+7
| | | | |
* | | | | Merge branch 'master' into i1340-SynchronousInjectionDan Finlay2017-10-131-1/+1
|\ \ \ \ \
| * | | | | dont lint jqueryfrankiebee2017-10-051-1/+1
| | | | | |
| * | | | | add /mascara to lintingfrankiebee2017-10-051-1/+1
| | |_|_|/ | |/| | |
* / | | | Begin implementing sync injection ideaDan Finlay2017-10-051-2/+2
|/ / / /
* | | | build - factor watcify into bundler generationkumavis2017-08-091-17/+11
| | | |
* | | | build - fix error swallowing on devkumavis2017-08-091-1/+16
| |_|/ |/| |
* | | phishing detection - move phishing detection into contentscript and metamask ↵kumavis2017-08-031-1/+0
| |/ |/| | | | | controller
* | Add first version of phishing site warningDan Finlay2017-07-131-0/+1
|/ | | | | | | | | Links to my own blacklist for now, since I added a package.json for easy importing. We can point at the main 408H repository once this is merged: https://github.com/409H/EtherAddressLookup/pull/24 Redirects detected phishing sites [here](https://metamask.io/phishing.html).
* Simplify build variables. Remove maps from production.Kevin Serrano2017-06-271-7/+7
|
* Fix build for eth-contract-metadataDan Finlay2017-06-141-1/+1
|
* Add address image map to icon factoryDan Finlay2017-05-261-0/+10
| | | | | | | Deriving from the new address image map repository I've added here: https://github.com/MetaMask/ethereum-contract-icons With this PR, images for addresses added to that repository will be shown instead of jazzicons in MetaMask.
* build - fix disc taskkumavis2017-05-091-1/+1
|
* build - make gulp return non-zero error code on bundle failkumavis2017-04-261-2/+0
|
* Delete all code related to disclaimers.Kevin Serrano2017-02-101-7/+0
|
* gulp - fix brfs instrumentationkumavis2017-01-111-3/+0
|
* gulp - cleanup commentskumavis2017-01-111-13/+19
|
* gulp - add disc bundle analysis taskkumavis2017-01-111-5/+51
|
* gulp - clean and simplifykumavis2017-01-111-23/+15
|
* Take out unneeded permissions from the app.Kevin Serrano2017-01-041-2/+28
|
* Move tos hash logic to build phase. Create dynamic global variables based on ↵Kevin Serrano2016-10-121-0/+9
| | | | build.
* Fix boolean.Kevin Serrano2016-09-031-1/+1
|
* Changelog add and rename vars.Kevin Serrano2016-09-031-6/+6
|
* Refactor for spreading. Add conditionals for livereload.Kevin Serrano2016-09-031-6/+24
|
* Add production flag. Conditionally copy reload based on production.Kevin Serrano2016-09-021-1/+16
|
* Install deps. Fix chrome/firefox typo.Kevin Serrano2016-09-021-3/+5
|
* Add Edge build to gulp configDan Finlay2016-08-081-3/+14
|
* Fix some gulp task issuesDan Finlay2016-07-291-18/+31
| | | | | | | | | | | | I know, I've been fixing up the gulp scripts all week. I keep fixing one thing then breaking another. In this commit, I fix some issues with some previous approaches. I no longer try to do the copying to `chrome` after `firefox`, I simply stream to both during copy and build tasks, and that logic is reused during dev and build tasks. The `copyTask` function now supports an array of `destinations`, that allows piping to multiple destinations, which is pretty cool. The `manifest:cleanup` task that chrome requires is now just part of the `copy` task, so we don't have to remember it everywhere we copy. So obvious it's like why only now.
* Fix dev tasks for multi browser copyingDan Finlay2016-07-291-10/+15
|
* Fix nondeterministic buildDan Finlay2016-07-281-1/+1
| | | | | | We used to be able to copy static resources while we built js, but now part of the copy task is copying firefox built files into chrome, so they need to be done in order. This could probably be optimized a bit more, but for now it builds reliably again.
* Correct typo commentDan Finlay2016-07-271-1/+1
|
* Fix copy taskDan Finlay2016-07-271-1/+0
|
* Fix chrome buildDan Finlay2016-07-271-2/+2
|
* Store versioned builds in builds folderDan Finlay2016-07-271-4/+5
|
* Add platform specific builds and zip tasks (#486)Dan Finlay2016-07-271-12/+41
| | | | | | | | | | | | | | | | | | | | | | | | * Add platform specific folders to dist folder * Remove gulp hacks * Add platform specific bundling dev and dist tasks now build into platform-specific folders within the `dist` folder. Added tasks `gulp zip` and `gulp dist`. `zip` builds the platform-specific folders into platform-specific bundles within the `dist` folder. `dist` builds and then zips all at once. * Fix chrome bundle zipping * Fix broken reference in eth warning * Fix but where web3.eth.accounts are not available in firefox. * Bump changelog
* Inject inpage script synchronouslyDan Finlay2016-07-261-0/+2
| | | | | | | | | | | | | | | | Huge thanks to the Firefox team, for their help on the issue of our long-standing inpage script race condition. http://stackoverflow.com/questions/38577656/how-can-i-make-a-firefox-add-on-contentscript-inject-and-run-a-script-before-oth The problem is that we were injecting a `script` tag and assigning its `src` attribute, which triggers an asynchronous fetch request, and does not guarantee execution order! (That was news to me!) Instead, I'm now assigning the `script` tag a `textContent` value of the script to inject, and it seems to fix the problem! There is also a Firefox-only API that could solve this whole problem in an even more elegant way, so we might want to expose a code path for that solution later on: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.exportFunction Allows you to expose an object from one scope to another. There was even talk of creating a polyfill for it that does virtually what we do, message passing between contexts.
* Manually lintedDan Finlay2016-06-221-3/+3
|
* Got eslint running correctlyDan Finlay2016-06-221-1/+3
|
* Began adding auto lintingDan Finlay2016-06-221-2/+22
|
* Make gulp watch images folderDan Finlay2016-06-151-1/+1
|
* ui - redesign - app header + accounts selectionkumavis2016-05-111-1/+5
|
* build - post process with dereqkumavis2016-04-211-0/+1
|
* Moved UI into repo with its own dependency stackDan Finlay2016-04-141-3/+3
|
* build - use gulp, remove gruntkumavis2016-03-121-7/+7
|
* build - add gulp build processkumavis2016-03-031-0/+131