README
sketch-module-update
A sketch module to manage a plugin's user preferences.
Usage
import prefsManager from 'sketch-module-user-preferences'
const defaultPreferences = {
timeBetweenChecks: 24 * 60 * 60 * 1000, // 1 day by default
exportFolder: '.exportedArtboards',
diffByDefault: true
}
const preferences = prefsManager.getUserPreferences('myPluginName', defaultPreferences)
prefsManager.setUserPreferences('myPluginName', {
timeBetweenChecks: 3 * 24 * 60 * 60 * 1000, // 3 days now
})
Installation
sketch-module-user-preferences
is available from npm
.
npm install --save sketch-module-user-preferences
Compatibility
sketch-module-user-preferences
requires Sketch >= 3