From 2a22d0f3995f471d62d85af204566a633c23e35e Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Tue, 24 Oct 2017 16:49:52 +0200 Subject: [PATCH] Update to new RS module API --- index.js | 9 +++++---- package.json | 3 ++- webpack.config.js | 8 -------- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index 54592a3..cb50416 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,4 @@ -var RemoteStorage = require('remotestoragejs'); - -RemoteStorage.defineModule("chat-messages", function (privateClient, publicClient) { + var ChatMessages = function (privateClient, publicClient) { /** * Schema: chat-messages/daily @@ -570,4 +568,7 @@ RemoteStorage.defineModule("chat-messages", function (privateClient, publicClien // Return public functions return { exports: exports }; -}); + +}; + +export default { name: 'chat-messages', builder: ChatMessages }; diff --git a/package.json b/package.json index 0734a1f..1fc5e94 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "dev": "webpack -w", - "build": "NODE_ENV=production webpack" + "build": "NODE_ENV=production webpack -p", + "version": "npm run build && git add dist/" }, "author": "Kosmos Developers (https://kosmos.org)", "contributors": [ diff --git a/webpack.config.js b/webpack.config.js index 7cc83aa..ba6b12b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,14 +12,6 @@ module.exports = { filename: __dirname + '/dist/build.js', libraryTarget: 'umd' }, - externals: { - "remotestoragejs": { - root: "RemoteStorage", //