sketch-module-user-preferences

    1.0.2 • Public • Published

    sketch-module-update

    Downloads per month Latest version

    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

    Install

    npm i sketch-module-user-preferences

    DownloadsWeekly Downloads

    13

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • sketchbot
    • mathieudutour