Skip to content

Commit

Permalink
Update StemJS to be compliant with stemjs-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
links234 committed Feb 17, 2017
1 parent 86d8fc3 commit 9e4938a
Show file tree
Hide file tree
Showing 14 changed files with 4,049 additions and 223 deletions.
1 change: 1 addition & 0 deletions stemjs-optimized/.babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"plugins": [
"external-helpers",
"transform-decorators-legacy",
"transform-class-properties",
["transform-react-jsx", { "pragma": "UI.createElement" }],
Expand Down
110 changes: 0 additions & 110 deletions stemjs-optimized/Main.js

This file was deleted.

5 changes: 2 additions & 3 deletions stemjs-optimized/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
<head>
<meta name="description" content="DBMON STEMJS" />
<link href="../styles.css" rel="stylesheet" type="text/css" />
<title>dbmon (StemJS - Optimized)</title>
<title>dbmon (StemJS)</title>
</head>
<body>
<div id="dbmon"></div>
<script src="../ENV.js"></script>
<script src="../lib/memory-stats.js"></script>
<script src="../lib/monitor.js"></script>
<script src="../lib/stemjs/babel.polyfill.min.js"></script>
<script src="../lib/stemjs/stem.min.js"></script>
<script src="./Main.js"></script>
<script src="src/bundle.js"></script>
<script src="../ga.js"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions stemjs-optimized/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "js-repaint-perfs-stemjs-optimized",
"version": "1.0.0",
"description": "None",
"main": "index.js",
"scripts": {
"build": "cd src; rollup -c"
},
"author": "Alexandru Murtaza",
"license": "ISC",
"devDependencies": {
"babel-plugin-transform-class-properties": "^6.19.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-react-jsx": "^6.8.0",
"babel-preset-es2015-rollup": "^1.2.0",
"rollup-plugin-babel": "^2.6.1",
"rollup-plugin-includepaths": "^0.1.6",
"rollup-plugin-uglify": "^1.0.1",
"rollup-watch": "^2.5.0",
"stem-core": "^0.2.1"
}
}
6 changes: 4 additions & 2 deletions stemjs-optimized/Main.jsx → stemjs-optimized/src/Main.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
let UI = stem.UI;
import {UI} from "UIBase";
import {NOOP_FUNCTION} from "base/Utils";

UI.Element.prototype.addListenersFromOptions = stem.NOOP_FUNCTION;
UI.Element.prototype.addListenersFromOptions = NOOP_FUNCTION;
UI.Element.prototype.applyNodeAttributes = function () {
if (this.options.className) {
this.node.className = this.options.className;
Expand Down Expand Up @@ -66,3 +67,4 @@ class BenchmarkElement extends UI.Element {
let node = document.getElementById("dbmon");
let benchmarkElement = new BenchmarkElement();
benchmarkElement.bindToNode(node, true);

Loading

0 comments on commit 9e4938a

Please sign in to comment.