pivotql-compiler-mapboxgl
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "pivotql-compiler-mapboxgl", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Compile PivotQL ASTs to mapbox filter queries.", | ||
"main": "./index.js", | ||
"main": "./lib/cjs/index.js", | ||
"module": "lib/esm/index.js", | ||
"exports": { | ||
".": "./index.js", | ||
"./package.json": "./package.json" | ||
"require": "./lib/cjs/index.js", | ||
"import": "./lib/esm/index.js" | ||
}, | ||
"type": "module", | ||
"files": [ | ||
"src", | ||
"lib" | ||
], | ||
"scripts": { | ||
"test": "jest", | ||
"build": "echo \"nothing to do\"" | ||
"test": "BABEL_ENV=test jest", | ||
"clean": "rimraf lib", | ||
"build:esm": "BABEL_ENV=esmUnbundled babel --config-file ../../babel.config.js src --out-dir lib/esm --source-maps", | ||
"build:cjs": "BABEL_ENV=cjs babel --config-file ../../babel.config.js src --out-dir lib/cjs --source-maps", | ||
"build": "npm run clean && npm run build:esm && npm run build:cjs" | ||
}, | ||
@@ -32,2 +39,7 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/cli": "^7.16.0", | ||
"@babel/core": "^7.16.0", | ||
"@babel/node": "^7.16.0", | ||
"@babel/preset-env": "^7.16.0", | ||
"babel-jest": "^27.3.1", | ||
"eslint": "^7.32.0", | ||
@@ -37,9 +49,17 @@ "eslint-config-prettier": "^8.3.0", | ||
"jest": "^27.2.2", | ||
"jest-esm-transformer": "^1.0.0", | ||
"pivotql-parser-expression": "^0.1.0" | ||
"pivotql-parser-expression": "^0.2.0", | ||
"rimraf": "^3.0.2" | ||
}, | ||
"jest": { | ||
"transform": { | ||
".js": "jest-esm-transformer" | ||
"\\.js$": [ | ||
"babel-jest", | ||
{ | ||
"configFile": "../../babel.config.js" | ||
} | ||
] | ||
}, | ||
"transformIgnorePatterns": [ | ||
"node_modules/(?!(pivotql-parser-expression)/)" | ||
], | ||
"testMatch": [ | ||
@@ -46,0 +66,0 @@ "**/tests/**/*.[jt]s?(x)", |
@@ -5,2 +5,25 @@ # PivotQL compiler for mapbox | ||
## Install | ||
```sh | ||
npm install pivotql-compiler-mapboxgl | ||
``` | ||
## Example | ||
```js | ||
import parse from 'pivotql-parser-expression'; | ||
import compile from 'pivotql-compiler-mapboxgl'; | ||
const query = '( height <= 20 or favorites.color == "green" ) and firstname in ["john", "doug"]'; | ||
const queryMB = compile(parse(query)) | ||
// Use query filter in layer style | ||
``` | ||
## More information | ||
See [main repository](https://github.com/jrmi/pivotql/) for more information. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
22388
8
313
29
11
1
No