build: update npm install command to use --legacy-peer-deps
This change modifies the build scripts to use --legacy-peer-deps flag when installing npm dependencies to resolve potential peer dependency conflicts during the build process. The change is applied to both bash (build.sh) and batch (build.bat) build scripts.
This commit is contained in:
+6
-8
@@ -1,5 +1,4 @@
|
||||
# flat-cache
|
||||
|
||||
> A stupidly simple key/value storage using files to persist the data
|
||||
|
||||
[](https://npmjs.org/package/flat-cache)
|
||||
@@ -16,19 +15,19 @@ npm i --save flat-cache
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const flatCache = require('flat-cache');
|
||||
var flatCache = require('flat-cache')
|
||||
// loads the cache, if one does not exists for the given
|
||||
// Id a new one will be prepared to be created
|
||||
const cache = flatCache.load('cacheId');
|
||||
var cache = flatCache.load('cacheId');
|
||||
|
||||
// sets a key on the cache
|
||||
cache.setKey('key', { foo: 'var' });
|
||||
|
||||
// get a key from the cache
|
||||
cache.getKey('key'); // { foo: 'var' }
|
||||
cache.getKey('key') // { foo: 'var' }
|
||||
|
||||
// fetch the entire persisted object
|
||||
cache.all(); // { 'key': { foo: 'var' } }
|
||||
cache.all() // { 'key': { foo: 'var' } }
|
||||
|
||||
// remove a key
|
||||
cache.removeKey('key'); // removes a key from the cache
|
||||
@@ -39,11 +38,11 @@ cache.save(); // very important, if you don't save no changes will be persisted.
|
||||
|
||||
// loads the cache from a given directory, if one does
|
||||
// not exists for the given Id a new one will be prepared to be created
|
||||
const cache = flatCache.load('cacheId', path.resolve('./path/to/folder'));
|
||||
var cache = flatCache.load('cacheId', path.resolve('./path/to/folder'));
|
||||
|
||||
// The following methods are useful to clear the cache
|
||||
// delete a given cache
|
||||
flatCache.clearCacheById('cacheId'); // removes the cacheId document if one exists.
|
||||
flatCache.clearCacheById('cacheId') // removes the cacheId document if one exists.
|
||||
|
||||
// delete all cache
|
||||
flatCache.clearAll(); // remove the cache directory
|
||||
@@ -57,7 +56,6 @@ To make that possible we need to store the `fileSize` and `modificationTime` of
|
||||
storage was needed and Bam! this module was born.
|
||||
|
||||
## Important notes
|
||||
|
||||
- If no directory is especified when the `load` method is called, a folder named `.cache` will be created
|
||||
inside the module directory when `cache.save` is called. If you're committing your `node_modules` to any vcs, you
|
||||
might want to ignore the default `.cache` folder, or specify a custom directory.
|
||||
|
||||
Reference in New Issue
Block a user