Use current filtrex version from git (fixes #101)

pull/108/head
Candid Dauth 2018-12-26 01:34:06 +01:00
rodzic 35c2efac02
commit c4c1867ea7
4 zmienionych plików z 30 dodań i 7 usunięć

Wyświetl plik

@ -1,5 +1,4 @@
const compileExpression = require('filtrex');
const compileExpression = require('../lib/filtrex');
const utils = require('./utils');
const filter = module.exports = {

Wyświetl plik

@ -0,0 +1,16 @@
const isNode = typeof global !== "undefined" && ({}).toString.call(global) === '[object global]'; // https://stackoverflow.com/a/38815760/242365
let filtrexFile;
if (isNode)
filtrexFile = eval("require")("fs").readFileSync(require.resolve("filtrex/filtrex"), { encoding: "utf8" });
else // Webpack
filtrexFile = require("raw-loader!filtrex/filtrex");
const compileExpression = eval(`
(function() {
${filtrexFile}
return compileExpression;
})()
`);
module.exports = compileExpression;

Wyświetl plik

@ -44,7 +44,7 @@
"event-stream": "^4.0.0",
"facilmap-client": "^2.7.0",
"file-saver": "^2.0.0-rc.2",
"filtrex": "^0.5.4",
"filtrex": "https://github.com/joewalnes/filtrex.git",
"isarray": "2.0.4",
"jquery": "^3.3.1",
"jquery-ui": "^1.12.1",
@ -83,6 +83,7 @@
"html-webpack-plugin": "^3.2.0",
"imports-loader": "^0.8.0",
"node-sass": "^4.9.3",
"raw-loader": "^1.0.0",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"sass-loader": "^7.1.0",

Wyświetl plik

@ -2946,10 +2946,9 @@ fill-range@^4.0.0:
repeat-string "^1.6.1"
to-regex-range "^2.1.0"
filtrex@^0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/filtrex/-/filtrex-0.5.4.tgz#98075d518f068c4f58b7b589a227d98bd9f6395d"
integrity sha1-mAddUY8GjE9Yt7WJoifZi9n2OV0=
"filtrex@https://github.com/joewalnes/filtrex.git":
version "0.0.0"
resolved "https://github.com/joewalnes/filtrex.git#685f5796211353623269de02b43bb6bc68e556a0"
find-cache-dir@^1.0.0:
version "1.0.0"
@ -5875,6 +5874,14 @@ raw-body@~1.1.0:
bytes "1"
string_decoder "0.10"
raw-loader@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-1.0.0.tgz#3f9889e73dadbda9a424bce79809b4133ad46405"
integrity sha512-Uqy5AqELpytJTRxYT4fhltcKPj0TyaEpzJDcGz7DFJi+pQOOi3GjR/DOdxTkTsF+NzhnldIoG6TORaBlInUuqA==
dependencies:
loader-utils "^1.1.0"
schema-utils "^1.0.0"
rc@^1.2.7:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"