Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
dependabot[bot] | 4f4015a4f7 | |
dependabot[bot] | b73ce7bd2e | |
David Humphrey | 3279c2d65a | |
Ben Heidemann | e135305f25 | |
David Humphrey | 0b26979839 | |
Ben Heidemann | 7efc4cdc1d | |
David Humphrey | 4112d072b5 | |
David Humphrey | ee26394ead | |
David Humphrey | 9f8804f716 | |
David Humphrey | 621b6567e0 |
|
@ -14,14 +14,14 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
node: ['12', '14']
|
||||
node: ['14', '16']
|
||||
|
||||
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
|
||||
name: Node ${{ matrix.node }} on ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Test
|
||||
uses: actions/setup-node@v2.1.5
|
||||
uses: actions/setup-node@v2.4.1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
|
|
19
README.md
19
README.md
|
@ -63,17 +63,28 @@ your webpack config:
|
|||
|
||||
```javascript
|
||||
// webpack.config.js
|
||||
var filer = require('filer');
|
||||
var { FilerWebpackPlugin } = require('filer/webpack');
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new filer.FilerWebpackPlugin(),
|
||||
new FilerWebpackPlugin(),
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
Previously it was recommended to access the `FilerWebpackPlugin` class by importing the main filer module. This was depracated due [this issue](https://github.com/filerjs/filer/issues/790). For anyone using ***filer version 1.4.0 or earlier***, please import the plugin class like this:
|
||||
|
||||
```javascript
|
||||
var FilerWebpackPlugin = require('filer/src/webpack-plugin');
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
You can then import the node.js [fs](http://nodejs.org/api/fs.html) and [path](http://nodejs.org/api/path.html)
|
||||
modules as normal and FilerWebpackPlugin will ensure that webpack will resolve references to these modules to
|
||||
modules as normal and `FilerWebpackPlugin` will ensure that webpack will resolve references to these modules to
|
||||
the appropriate filer shims. You will then be able to use these modules as normal (with the exception of the
|
||||
synchronous fs methods e.g. `mkdirSync()`).
|
||||
|
||||
|
@ -90,7 +101,7 @@ options object.
|
|||
// webpack.config.js
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new filer.FilerWebpackPlugin({
|
||||
new FilerWebpackPlugin({
|
||||
// Options
|
||||
}),
|
||||
],
|
||||
|
|
|
@ -19824,6 +19824,16 @@ module.exports = Filer = {
|
|||
path: require('./path.js'),
|
||||
Errors: require('./errors.js'),
|
||||
Shell: require('./shell/shell.js'),
|
||||
|
||||
/**
|
||||
* @deprecated Importing filer from your webpack config is not recommended.
|
||||
*
|
||||
* The filer `FilerWebpackPlugin` class is exposed directly.
|
||||
*
|
||||
* ```
|
||||
* const { FilerWebpackPlugin } = require('filer/webpack');
|
||||
* ```
|
||||
*/
|
||||
FilerWebpackPlugin: require('./webpack-plugin')
|
||||
}; // Add a getter for the `fs` instance, which returns
|
||||
// a Filer FileSystem instance, using the default provider/flags.
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
|
@ -10,7 +10,7 @@
|
|||
"indexeddb",
|
||||
"idb"
|
||||
],
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.1",
|
||||
"author": "Alan K <ack@modeswitch.org> (http://blog.modeswitch.org)",
|
||||
"homepage": "http://filerjs.github.io/filer",
|
||||
"bugs": "https://github.com/filerjs/filer/issues",
|
||||
|
@ -53,12 +53,12 @@
|
|||
"regenerator-runtime": "^0.13.9",
|
||||
"chai": "^4.3.4",
|
||||
"chai-datetime": "^1.8.0",
|
||||
"eslint": "^7.20.0",
|
||||
"fake-indexeddb": "^3.1.4",
|
||||
"karma": "^6.3.4",
|
||||
"eslint": "^7.32.0",
|
||||
"fake-indexeddb": "^3.1.7",
|
||||
"karma": "^6.3.8",
|
||||
"karma-chai": "^0.1.0",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-firefox-launcher": "^2.1.1",
|
||||
"karma-firefox-launcher": "^2.1.2",
|
||||
"karma-mocha": "^2.0.1",
|
||||
"karma-mocha-reporter": "^2.2.5",
|
||||
"karma-summary-reporter": "^3.0.0",
|
||||
|
@ -77,7 +77,9 @@
|
|||
"files": [
|
||||
"src",
|
||||
"lib",
|
||||
"dist"
|
||||
"dist",
|
||||
"shims",
|
||||
"webpack"
|
||||
],
|
||||
"nyc": {
|
||||
"exclude": [
|
||||
|
|
|
@ -9,6 +9,15 @@ module.exports = Filer = {
|
|||
path: require('./path.js'),
|
||||
Errors: require('./errors.js'),
|
||||
Shell: require('./shell/shell.js'),
|
||||
/**
|
||||
* @deprecated Importing filer from your webpack config is not recommended.
|
||||
*
|
||||
* The filer `FilerWebpackPlugin` class is exposed directly.
|
||||
*
|
||||
* ```
|
||||
* const { FilerWebpackPlugin } = require('filer/webpack');
|
||||
* ```
|
||||
*/
|
||||
FilerWebpackPlugin: require('./webpack-plugin'),
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
FilerWebpackPlugin: require('../src/webpack-plugin'),
|
||||
};
|
Loading…
Reference in New Issue