remoteStorage

Tip: developing remotestorage.js without building

if you can’t or don’t want to build remotestorage.js and want to include an experimental version in an app to try it out, the following code (replacing <script src="remotestorage.js"></script>) can help (just put the whole remotestorage.js repo in a directory called ‘rs-js’:

  <!-- core -->
  <script src="rs-js/lib/promising.js"></script>
  <script src="rs-js/src/remotestorage.js"></script>
  <script src="rs-js/src/eventhandling.js"></script>
  <script src="rs-js/src/wireclient.js"></script>
  <script src="rs-js/src/discover.js"></script>
  <script src="rs-js/src/authorize.js"></script>
  <script src="rs-js/src/access.js"></script>
  <script src="rs-js/src/env.js"></script>

  <!-- widget -->
  <script src="rs-js/src/i18n.js"></script>
  <script src="rs-js/src/assets.js"></script>
  <script src="rs-js/src/widget.js"></script>
  <script src="rs-js/src/view.js"></script>
  
  <!-- baseclient -->
  <script src="rs-js/lib/tv4.js"></script>
  <script src="rs-js/lib/Math.uuid.js"></script>
  <script src="rs-js/src/baseclient.js"></script>
  <script src="rs-js/src/baseclient/types.js"></script>

  <!-- caching -->
  <script src="rs-js/src/caching.js"></script>
  <script src="rs-js/src/sync.js"></script>
  <script src="rs-js/src/cachinglayer.js"></script>
  <script src="rs-js/src/indexeddb.js"></script>
  <script src="rs-js/src/localstorage.js"></script>
  <script src="rs-js/src/inmemorystorage.js"></script>

  <!-- the rest: -->
  <script src="rs-js/src/modules.js"></script>
  <script src="rs-js/src/debug/inspect.js"></script>
  <script src="rs-js/src/legacy.js"></script>
  <script src="rs-js/src/googledrive.js"></script>
  <script src="rs-js/src/dropbox.js"></script>
  <script>remoteStorage = new RemoteStorage();</script>

there might be other ways to do this if you use bower or something, but when developing on a Windows computer without internet, i found this to be the most low-tech and fail-safe solution. :slight_smile:

Why not AMD? Maybe it’s time to finally re-add support?

1 Like

Isn’t AMD the hot shit nowadays?