{"name":"jsx2mp-runtime","version":"0.4.6-1","description":"Runtime for jsx2mp.","miniprogram":{"ali":"dist/jsx2mp-runtime.ali.esm.js","wechat":"dist/jsx2mp-runtime.wechat.esm.js","quickapp":"dist/jsx2mp-runtime.quickapp.esm.js"},"scripts":{"build":"cross-env NODE_ENV=production rollup -c rollup.config.js","prepublish":"npm run build"},"author":{"name":"Rax Team"},"devDependencies":{"@babel/core":"^7.4.5","@babel/plugin-proposal-class-properties":"^7.5.5","@babel/preset-env":"^7.4.5","@babel/types":"^7.8.3","cross-env":"^5.2.0","rollup":"^1.13.1","rollup-plugin-babel":"^4.3.2","rollup-plugin-cleanup":"^3.1.1","rollup-plugin-filesize":"^6.1.0","rollup-plugin-replace":"^2.2.0","universal-env":"^3.0.0"},"readme":"# jsx2mp-runtime\n\nProvide runtime support for rax style miniapp.\n\n- createComponent\n   ```js\n   const __class_def__ = class {\n     state = {\n       name: 'Rax'\n     };\n   \n     handleTap() {\n       this.setState({\n         name: 'MiniApp'\n       });\n     }\n   };\n   \n   const config = createComponent(__class_def__, 'class');\n\n  Component(config);\n  ```\n- (state) useState(defaultValue, key)\n  ```js\n  const __fn_def__ = function Header(props) {\n    const [name, setName] = useState('World', 'name');\n    const [count, setCount] = useState(0, 'count');\n  \n    return {\n      handleClick() {\n        setName('Rax');\n        setCount(count + 1);\n      }\n    }\n  };\n  \n  const config = createComponent(__fn_def__, 'function');\n  Component(config);\n  ```\n- (void) useEffect(callback)\n  ```js\n  const __fn_def__ = function Header(props) {\n    const [name, setName] = useState('World', 'name');\n    useEffect(() => {\n      console.log('didMount');\n  \n      return function unmount() {\n        console.log('unmount');\n      };\n    }, []);\n  \n    return {\n      handleClick: () => {\n        setName('Rax');\n      },\n    };\n  };\n  \n  const config = createComponent(__fn_def__, 'function');\n  Component(config);\n  ```\n","readmeFilename":"README.md","_id":"jsx2mp-runtime@0.4.6-1","_nodeVersion":"10.16.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-ISDvKGOICsWjTIdbVGUsI2Wo080JPVD2pWGsNo6kcokXvHQh9udxiKXJnD7I07py0BSwXsGL0L3/hLfOB2/MSQ==","shasum":"8c11fd72453ae850eefa7df8e20558c7af98ef64","tarball":"http://registry-npm.ywwl.com/jsx2mp-runtime/download/jsx2mp-runtime-0.4.6-1.tgz","fileCount":5,"unpackedSize":137395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehAUMCRA9TVsSAnZWagAAR6oP/2kemXIjpMSW6Tj1/uk7\nuxInkmw5/6nu4h0ET2aiNBy2O4QMQ9WTmFCY7papzDq5Nt78LZen2/AFxJOG\nO0INRZxmmKaaoodkvRQGkVdIuICBgy8PufsJsil3xQUT0sXq+VKJu4UZ+4I+\nVRF2SnupSUMQWCcTBylDuECPEAFgnZ33/5BLmQwD2EqdaBNJtuCBiKYqpvJ/\nkNcGxgaB07Xvb/ZQnYSx4Z67vT3l6s+kBLrnngm58yShyqjfGDIr/Qho57GP\nWwh8R/GcVUvS7IF7i2gcmA5RVN3k0v3WMSaT8J6h+sZV2FWGufoJRb+Igy6R\nQPWKg/tzdDvvLEvZ8Szv1M5f//AEMX7ztCV2xeOFn8/q8R9ws/AifvPYxS94\nkqKwWm/9+xKnnfZndiGM67/zLjyP4F9w+TQ8pD+7s+k/cb/Npk5f1hoIrudu\nJbgmI03o4zp+aKBCmFvEJLYFA4/C3vTP+zHodEtfR5IwlrEDeHWRitCXBuQh\nMYGWZjgY7HNxxs9t/e129ltBcR73/sG515HgyBsWsa11duH2rcs7A88k89GI\n0FylqiqcIvuj3LONB/bBt/5Jy2LjfcqcE52LazlphfjlNk/pz7EnP1LD8Nxt\np2uwadZEuZViWf1r1oQkRwa3sSN0p39yvglnXKlo7umTTDpmL4nlYNuElRS9\nIwY1\r\n=sVbc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1dsj39q3ha4UVP59rKoVR9/yLVTH+O7wzh6SljWxCdAiAT46dY/Wsd6coxjZ5tPF9fKU3g1wD+/IGOlWIJ5X3KEw=="}],"size":30882,"noattachment":false,"key":"/jsx2mp-runtime/-/jsx2mp-runtime-0.4.6-1.tgz"},"maintainers":[{"email":"yxy0919@foxmail.com","name":"chriscindy"},{"email":"likai757@gmail.com","name":"likai757"},{"email":"rax-public@alibaba-inc.com","name":"rax-publisher"},{"email":"feifeishen1996@gmail.com","name":"solojiang"},{"email":"wssgcg1213@qq.com","name":"zeroling"}],"_npmUser":{"name":"solojiang","email":"feifeishen1996@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jsx2mp-runtime_0.4.6-1_1585710348518_0.736575728239699"},"_hasShrinkwrap":false,"publish_time":1585710348639,"_cnpm_publish_time":1585710348639,"dist-tags":{"beta":"0.4.26-2","latest":"0.4.25"}}