Update to new RS module API
This commit is contained in:
parent
2ff10577c0
commit
2a22d0f399
9
index.js
9
index.js
@ -1,6 +1,4 @@
|
|||||||
var RemoteStorage = require('remotestoragejs');
|
var ChatMessages = function (privateClient, publicClient) {
|
||||||
|
|
||||||
RemoteStorage.defineModule("chat-messages", function (privateClient, publicClient) {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Schema: chat-messages/daily
|
* Schema: chat-messages/daily
|
||||||
@ -570,4 +568,7 @@ RemoteStorage.defineModule("chat-messages", function (privateClient, publicClien
|
|||||||
|
|
||||||
// Return public functions
|
// Return public functions
|
||||||
return { exports: exports };
|
return { exports: exports };
|
||||||
});
|
|
||||||
|
};
|
||||||
|
|
||||||
|
export default { name: 'chat-messages', builder: ChatMessages };
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"dev": "webpack -w",
|
"dev": "webpack -w",
|
||||||
"build": "NODE_ENV=production webpack"
|
"build": "NODE_ENV=production webpack -p",
|
||||||
|
"version": "npm run build && git add dist/"
|
||||||
},
|
},
|
||||||
"author": "Kosmos Developers <mail@kosmos.org> (https://kosmos.org)",
|
"author": "Kosmos Developers <mail@kosmos.org> (https://kosmos.org)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
@ -12,14 +12,6 @@ module.exports = {
|
|||||||
filename: __dirname + '/dist/build.js',
|
filename: __dirname + '/dist/build.js',
|
||||||
libraryTarget: 'umd'
|
libraryTarget: 'umd'
|
||||||
},
|
},
|
||||||
externals: {
|
|
||||||
"remotestoragejs": {
|
|
||||||
root: "RemoteStorage", // <script src='remotestorage.js'> will resolve in this.RemoteStorage
|
|
||||||
commonjs2: "remotestoragejs", // require('remotestoragejs')
|
|
||||||
commonjs: "remotestoragejs", // require('remotestoragejs')
|
|
||||||
amd: "remotestoragejs" // define(['remotestoragejs'], ...)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
{ test: /\.js$/, exclude: '/node_modules|dist/', loader: 'babel?presets[]=es2015' },
|
{ test: /\.js$/, exclude: '/node_modules|dist/', loader: 'babel?presets[]=es2015' },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user