Skip to content

Commit

Permalink
fix collect-stats job (convert to esm) (mapbox#10379)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Feb 11, 2021
1 parent 1c6fa7a commit fef8d30
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bench/gl-stats.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* eslint-disable import/no-commonjs */
import puppeteer from 'puppeteer';
import fs from 'fs';
import zlib from 'zlib';
import {execSync} from 'child_process';

const puppeteer = require('puppeteer');
const fs = require('fs');
const zlib = require('zlib');
const mapboxGLJSSrc = fs.readFileSync('dist/mapbox-gl.js', 'utf8');
const mapboxGLCSSSrc = fs.readFileSync('dist/mapbox-gl.css', 'utf8');
const benchSrc = fs.readFileSync('bench/gl-stats.html', 'utf8');
const {execSync} = require('child_process');

const benchHTML = benchSrc
.replace(/<script src="..\/dist\/mapbox-gl.js"><\/script>/, `<script>${mapboxGLJSSrc}</script>`)
Expand Down

0 comments on commit fef8d30

Please sign in to comment.