trying to package the webapp
This commit is contained in:
@@ -40,5 +40,11 @@
|
||||
<script src="src/tinode.js"></script>
|
||||
<!-- the application -->
|
||||
<script type="text/babel" src="src/webapp.js"></script>
|
||||
<script type="text/babel">
|
||||
ReactDOM.render(
|
||||
<TinodeWeb />,
|
||||
document.getElementById('mountPoint')
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+1
-1
@@ -27,6 +27,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="mountPoint"></div>
|
||||
<script src="index.min.js"></script>
|
||||
<script src="umd/index.prod.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
+9
-3
@@ -16,8 +16,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:babel && npm run build:prod && npm run build:css",
|
||||
"build:dev": "browserify ./src/index.js --standalone TinodeWeb > ./umd/webapp.dev.js",
|
||||
"build:prod": "browserify ./src/index.js --standalone TinodeWeb --plugin tinyify > ./umd/webapp.prod.js",
|
||||
"build:dev": "browserify ./src/index.js --standalone Webapp > ./umd/index.dev.js",
|
||||
"build:prod": "browserify ./src/index.js --standalone Webapp --plugin tinyify > ./umd/index.prod.js",
|
||||
"build:babel": "babel ./src/webapp.js --presets react --out-file ./webapp.js",
|
||||
"build:css": "postcss css/base.css > css/base.min.css",
|
||||
"babel-version": "babel --version"
|
||||
@@ -57,5 +57,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/tinode/chat",
|
||||
"email": "gene@tinode.co",
|
||||
"license": "Apache-2.0"
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"react": "^16.4.2",
|
||||
"react-dom": "^16.4.2",
|
||||
"tinode-sdk": "^0.15.5",
|
||||
"tinyify": "^2.4.3"
|
||||
}
|
||||
}
|
||||
|
||||
+8
-5
@@ -1,9 +1,12 @@
|
||||
let React = require('react');
|
||||
let ReactDOM = require('react-dom');
|
||||
let Tinode = require('tinode-sdk');
|
||||
let TinodeWeb = require('webapp.js')
|
||||
// Put all packages together.
|
||||
// Used to generate umd/index.prod.js
|
||||
|
||||
var React = require('react');
|
||||
var ReactDOM = require('react-dom');
|
||||
var Tinode = require('tinode-sdk');
|
||||
var TinodeWeb = require('../webapp.js')
|
||||
|
||||
ReactDOM.render(
|
||||
<TinodeWeb />,
|
||||
React.createElement(TinodeWeb, null),
|
||||
document.getElementById('mountPoint')
|
||||
);
|
||||
|
||||
+3
-4
@@ -5192,7 +5192,6 @@ class TinodeWeb extends React.Component {
|
||||
}
|
||||
};
|
||||
|
||||
ReactDOM.render(
|
||||
<TinodeWeb />,
|
||||
document.getElementById('mountPoint')
|
||||
);
|
||||
if (typeof module != 'undefined') {
|
||||
module.exports = TinodeWeb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user