-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to ES modules and Rollup (#6196)
* [codemod] convert src/ from commonjs to es6 modules Using 5to6-codemod/transforms/{cjs,exports,named-export-generation}.js * [codemod] convert bench/ to use import instead of require() 5to6-codemod/transforms/cjs.js * [codemod] Convert util.* to use named imports https://gist.github.com/anandthakker/b636ad8cb7782c47998c4de9c0c5419d * Setup rollup * Manual es6 module fixes * Fix(ish) codegen * Apply fixed codegen * Add flow-remove-types require hook using pirates Upstream: facebookarchive/flow-remove-types#62 * Update docs site to use es module import * Upgrade batfish * Update benchmarks build * Update style-spec build * [codemod] Convert test/unit to use import instead of require 5to6 cjs transform * Workaround for standard-things/esm#301 * Add scripts to run node/tap with require hooks * [codemod] test/unit no-strict * Avoid @std/esm 'temporal dead zone' warning * Fixup unit tests * Add comments explaining bundling strategy * Update integration test suite implementation * Update yarn.lock Specifically for zaach/jsonlint#103 (comment) * Polish build - Remove browserify - Update build tests * [lint] Use sourceType: script for test/integration/ * [lint] Add eslint-plugin-import, fix lint in src/ * [lint] Fix lint in test/ * [lint] Fix lint in bench/ * [lint] Fix lint for docs/ * Fix rollup config warning * Move rollup plugins to devDependencies * Use @mapbox-scoped rollup while awaiting upstream merge * Move comment in benchmarks.js * Restore comments stripped by codemods * Fix Style#queryRenderedFeature unit tests
- Loading branch information
1 parent
b98a9f7
commit 03680eb
Showing
418 changed files
with
5,747 additions
and
5,433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/rollup/build/ | ||
/docs/components/api.json | ||
/dist/mapbox-gl-dev.js | ||
/dist/mapbox-gl.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
// @flow | ||
|
||
const Benchmark = require('../lib/benchmark'); | ||
const createFilter = require('../../src/style-spec/feature_filter'); | ||
const filters = require('../data/filters.json'); | ||
import Benchmark from '../lib/benchmark'; | ||
|
||
module.exports = class FilterCreate extends Benchmark { | ||
import createFilter from '../../src/style-spec/feature_filter'; | ||
import filters from '../data/filters.json'; | ||
|
||
export default class FilterCreate extends Benchmark { | ||
bench() { | ||
for (const filter of filters) { | ||
createFilter(filter.filter); | ||
} | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.