Skip to content

Commit

Permalink
:compile
Browse files Browse the repository at this point in the history
  • Loading branch information
yysun committed Nov 2, 2019
1 parent 5454527 commit 2c0fe67
Show file tree
Hide file tree
Showing 50 changed files with 1,515 additions and 341 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
node_modules
coverage
*.log
esm
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
* apprun@latet: 1.x, stable, es5
* apprun@es6: 2.x, stable, es2015, web component

## 1.22 / 2.22

*  Allow event to be turned or off inside a run call
* Allow mounted life cycle function to return state and Promise of state
* Merge dev-tools into one file: apprun-dev-tools.js

## 1.21 / 2.21

* Allow embedding elements in JSX
Expand Down
2 changes: 1 addition & 1 deletion demo-html/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo-html/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/app.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/apprun-dev-tools-tests.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apprun=e():t.apprun=e()}(this,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}({4:function(t,e){let n;function o(t){(n=window.open("",t)).document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n </style>\n <body><pre>`)}function r(t){n.document.write(t+"\n")}function c(){n.document.write("</pre>\n </body>\n </html>"),n.document.close()}app.debug=!0;let s=!1,a=[];app.on("debug",t=>{s&&t.vdom&&(a.push(t),console.log(`* ${a.length} state(s) recorded.`))});const u=t=>{"start"===t?(a=[],s=!0,console.log("* State logging started.")):"stop"===t?(0!==a.length?(o(""),a.forEach((t,e)=>{r(` it ('view snapshot: #${e+1}', ()=>{`),r(` const component = ${t.component.constructor.name};`),r(` const state = ${JSON.stringify(t.state,void 0,2)};`),r(" const vdom = component['view'](state);"),r(" expect(JSON.stringify(vdom)).toMatchSnapshot();"),r(" })")}),c()):console.log("* No state recorded."),s=!1,a=[],console.log("* State logging stopped.")):console.log("create-state-tests <start|stop>")};window["_apprun-create-event-tests"]=["create-event-tests",()=>(()=>{const t={components:{}};app.run("get-components",t);const{components:e}=t;o(""),Object.keys(e).forEach(t=>{e[t].forEach(t=>{r(`const component = ${t.constructor.name};`),r(`describe('${t.constructor.name}', ()=>{`),t._actions.forEach(t=>{r(` it ('should handle event: ${t.name}', ()=>{`),r(` component.run('${t.name}');`),r(" expect(component.state).toBeTruthy();"),r(" })")}),r("});")})}),c()})()],window["_apprun-create-state-tests"]=["create-state-tests <start|stop>",t=>u(t)]}})});
//# sourceMappingURL=apprun-dev-tools-tests.js.map
/* -- no need to include this file */
1 change: 0 additions & 1 deletion dist/apprun-dev-tools-tests.js.map

This file was deleted.

Loading

0 comments on commit 2c0fe67

Please sign in to comment.