-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
27 changed files
with
883 additions
and
821 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'@cknow/eslint-config' | ||
] | ||
}; | ||
root: true, | ||
extends: '@datalogix/eslint-config', | ||
env: { | ||
browser: true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.nyc_output/ | ||
coverage/ | ||
node_modules/ | ||
npm-debug.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', { | ||
targets: { | ||
node: 'current' | ||
} | ||
} | ||
] | ||
presets: [ | ||
[ | ||
'@babel/preset-env', { | ||
targets: { | ||
node: 'current' | ||
} | ||
} | ||
] | ||
}; | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
extends: [ | ||
'@commitlint/config-conventional' | ||
] | ||
}; | ||
extends: [ | ||
'@commitlint/config-conventional' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict'; | ||
|
||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
|
||
var localforage = _interopDefault(require('localforage')); | ||
|
||
const VueLocalforage = { | ||
install(Vue, options = {}) { | ||
Vue.$localforage = localforage.createInstance(options); | ||
Vue.prototype.$localforage = Vue.$localforage; | ||
|
||
if (!options.instances) { | ||
return | ||
} | ||
|
||
for (const instance of options.instances) { | ||
const name = instance.storeName || instance.name; | ||
|
||
if (!name) { | ||
continue | ||
} | ||
|
||
Vue.$localforage[name] = localforage.createInstance(instance); | ||
Vue.prototype.$localforage[name] = Vue.$localforage[name]; | ||
} | ||
} | ||
}; | ||
|
||
/* istanbul ignore next */ | ||
if (typeof window !== 'undefined' && window.Vue) { | ||
window.Vue.use(VueLocalforage); | ||
} | ||
|
||
module.exports = VueLocalforage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import localforage from 'localforage'; | ||
|
||
const VueLocalforage = { | ||
install(Vue, options = {}) { | ||
Vue.$localforage = localforage.createInstance(options); | ||
Vue.prototype.$localforage = Vue.$localforage; | ||
|
||
if (!options.instances) { | ||
return | ||
} | ||
|
||
for (const instance of options.instances) { | ||
const name = instance.storeName || instance.name; | ||
|
||
if (!name) { | ||
continue | ||
} | ||
|
||
Vue.$localforage[name] = localforage.createInstance(instance); | ||
Vue.prototype.$localforage[name] = Vue.$localforage[name]; | ||
} | ||
} | ||
}; | ||
|
||
/* istanbul ignore next */ | ||
if (typeof window !== 'undefined' && window.Vue) { | ||
window.Vue.use(VueLocalforage); | ||
} | ||
|
||
export default VueLocalforage; |
Oops, something went wrong.