1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Raymond Hill
5879610597
Bump up nodejs package version 2021-08-08 09:21:03 -04:00
Raymond Hill
af54415959
README has unsaved pending edits... 2021-08-06 08:29:13 -04:00
Raymond Hill
4495c37ca3
Provide basic documentation for the NPM package 2021-08-06 08:25:36 -04:00
Raymond Hill
5eb99a4dd6
... 2021-08-05 14:36:13 -04:00
Raymond Hill
05f0e04c07
Just trying to get this done.. 2021-08-05 14:34:21 -04:00
Raymond Hill
fe7ce8f576
Need to bump version to publish README 2021-08-05 14:32:07 -04:00
Manish Jethani
3879835324
Remove bundle generation from Node.js package (#3796) 2021-08-02 09:17:56 -04:00
Raymond Hill
f1106acf4b
Rename nodejs package
Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664#issuecomment-890834827
2021-08-02 08:08:43 -04:00
Manish Jethani
297bcea49b
Generate bundle.min.js in Node.js install script (#3794) 2021-08-01 18:33:13 -04:00
Manish Jethani
0b764934e0
Serialize PSL in Node.js install script (#3793) 2021-08-01 16:42:05 -04:00
Manish Jethani
8a33bda653
Use lower case for Node.js package name (#3792) 2021-08-01 05:22:57 -04:00
Raymond Hill
22022f636f
Modularize codebase with export/import
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1664

The changes are enough to fulfill the related issue.

A new platform has been added in order to allow for building
a NodeJS package. From the root of the project:

    ./tools/make-nodejs

This will create new uBlock0.nodejs directory in the
./dist/build directory, which is a valid NodeJS package.

From the root of the package, you can try:

    node test

This will instantiate a static network filtering engine,
populated by easylist and easyprivacy, which can be used
to match network requests by filling the appropriate
filtering context object.

The test.js file contains code which is typical example
of usage of the package.

Limitations: the NodeJS package can't execute the WASM
versions of the code since the WASM module requires the
use of fetch(), which is not available in NodeJS.

This is a first pass at modularizing the codebase, and
while at it a number of opportunistic small rewrites
have also been made.

This commit requires the minimum supported version for
Chromium and Firefox be raised to 61 and 60 respectively.
2021-07-27 17:26:04 -04:00