{"_id":"@emanuel-alvgard/onlyjs","name":"@emanuel-alvgard/onlyjs","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@emanuel-alvgard/onlyjs","version":"0.0.1","description":"JavaScript web framework with as little performance bottlenecks as possible, where JavaScript, HTML and CSS are unified into a coherent and developer friendly interface.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/emanuel-alvgard/onlyjs.git"},"author":{"name":"Emanuel Alvgard"},"license":"MIT","bugs":{"url":"https://github.com/emanuel-alvgard/onlyjs/issues"},"homepage":"https://github.com/emanuel-alvgard/onlyjs#readme","gitHead":"a8aff9cd0e8d61e2a8742922388ede4fe2b8a583","_id":"@emanuel-alvgard/onlyjs@0.0.1","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-VtWwwdC6eFWuZZRYbmqi9xwl5JU+92BRLRYfI+L79km8GnlQ08H3bmHByW7vo0CsHf6NYVRfLGpK4f4Yc2oi8A==","shasum":"05df5cb6b57b01c8c800459193ecd31581872075","tarball":"https://registry.npmjs.org/@emanuel-alvgard/onlyjs/-/onlyjs-0.0.1.tgz","fileCount":45,"unpackedSize":8962367,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQoBOJi8TJvF9BxSlDpLf3z8cySN2dx25WUf1o6lOcMgIhAMG0VBMX0cKmllX62Boe2kBY1gT37sJUiqMgrCZzn0V3"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGqzqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpAkRAAo6rudsNKxLownY7oXLTt2JI8F6AQmN5TYBFyBeZqBDrII5AJ\r\nxB/6dOBMrFnlNNk6QblWfQxecHr/45nF1S9Amrd2GBx/SvYz0azN0EPeQRp4\r\n1gqsWMIE9dDEjAGvHcCozARm1jV0t0lM7nyUs0h5PeBt1dH/k42heq5h+qp2\r\nSF0/x0iPOgBpfryRXynm7bvXNxuyJSVihipXtqDl2Gs6tkp44kPIQezA9wYr\r\nfCMghWUiMnbyBIIRmSqPZ31TV7s77UC/s13j2T8iSKj50uw2k3OY9guqYtuV\r\nno4Sm/QlzLdqHCAlLCJF7inpCLmWxBAN2zv3KTPJYorM7p1y6+QsFfIqQa1V\r\nF1W0j1CZ/5VO2CK6mWwM4axXsCuL3LNeyndkEk73/dTm6JIkhTrCXQj5IprG\r\nUDhtihS391t3y1JGtx3NtLWbrh7FDzFJvSVQPLngLZsZ94HnrS3RvdppmpTD\r\n4RZxja7o+QqybR9XFHKWqxWZEgW2XNeHkgwg+nqgPqpMn3h97xKmJzZu2Deo\r\nFeBeRTTF3Kf/rTBHNjrvrWf5uTwg1zdme637BUaOKJ9ow3/Y0lAnR+Co4UoL\r\nnLmnR4+N1ctKOzepv+/qWNsxF2xJdfEJRLC9kR+ztllBbZRsMvWhmI1MLZ9N\r\nqWT07B60Sowib+9Mdk/7rG3T8E5lvVpaggQ=\r\n=wG4N\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"emanuel-alvgard","email":"emanuel.alvgard@gmail.com"},"directories":{},"maintainers":[{"name":"emanuel-alvgard","email":"emanuel.alvgard@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/onlyjs_0.0.1_1679469801595_0.7181381479225246"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-22T07:23:21.528Z","0.0.1":"2023-03-22T07:23:22.023Z","modified":"2023-03-22T07:23:22.258Z"},"maintainers":[{"name":"emanuel-alvgard","email":"emanuel.alvgard@gmail.com"}],"description":"JavaScript web framework with as little performance bottlenecks as possible, where JavaScript, HTML and CSS are unified into a coherent and developer friendly interface.","homepage":"https://github.com/emanuel-alvgard/onlyjs#readme","repository":{"type":"git","url":"git+https://github.com/emanuel-alvgard/onlyjs.git"},"author":{"name":"Emanuel Alvgard"},"bugs":{"url":"https://github.com/emanuel-alvgard/onlyjs/issues"},"license":"MIT","readme":"# only.js (ALPHA)\r\n\r\nJavaScript only web framework.\r\n\r\n**Disclaimers**\r\n------\r\n+ This project is currently being developed by a single person and will continue to be so until\r\nit has passed it's most experimental stage. To contribute one can read the code and submit issues. Help with\r\nautomated testing, documentation etc. will probably be needed in the near future.\r\n\r\n**Features**\r\n------\r\n+ Small runtime (~5KB minified & gzipped)\r\n+ Only (1) external dependency (ESBuild)\r\n+ Low amount of garbage collection\r\n+ Builtin animation system\r\n+ Convenient asset loading\r\n+ Hot reload / rebuild\r\n\r\n**Counter example**\r\n------\r\n```javascript\r\n\r\nlet counter = 0\r\n\r\n// GETS CALLED EVERY FRAME\r\nexport default (app) => {\r\n    \r\n    // CREATING VIEW & ELEMENTS\r\n    const _window = app.view(\"window\", \"dom\")\r\n    const title = _window.element(\"title\", \"h1\")\r\n    const increment = _window.element(\"increment\", \"button\")\r\n\r\n    // LOADING ASSETS\r\n    if (app.SETUP) {\r\n        _window.visible(false) \r\n        app.font(\"roboto\", \"roboto.woff2\") \r\n    }\r\n\r\n    // STYLING\r\n    title\r\n        .text(\"The count is: \" + count)\r\n        .text_color([200,200,200,1])\r\n        .text_font(app.font(\"roboto\"))\r\n\r\n    increment\r\n        .text(\"Increment\")\r\n        .text_font(app.font(\"roboto\"))\r\n\r\n    // EVENTS\r\n    if (increment.CLICK) { counter ++ }\r\n\r\n    // SHOW VIEW WHEN ASSETS LOADED\r\n    if (app.font(\"roboto\").DONE) { \r\n        _window.visible(true) \r\n    }\r\n}\r\n\r\n```\r\n**Routing example**\r\n------\r\n```javascript\r\n\r\n// GETS CALLED EVERY FRAME\r\nexport default (app) => {\r\n    \r\n    // CREATING VIEW & ELEMENTS\r\n    const _window = app.view(\"window\", \"dom\")\r\n    const location = _window.element(\"location\", \"button\")\r\n\r\n    // CHANGE LOCATION\r\n    if (location.CLICK) {\r\n        app.location(\"/other-component\")\r\n    }\r\n\r\n    // ROUTING\r\n    app.route(\"/this-component\",\r\n        () => { // INCOMING\r\n            _window.visible(false)\r\n        },\r\n        () => { // OUTGOING\r\n            _window.visible(true)\r\n        }\r\n    ) \r\n}\r\n\r\n```\r\n\r\n**Vision**\r\n------\r\n*To create web framework with as little performance bottlenecks as possible, where \r\nJavaScript, HTML and CSS are unified into a coherent and developer friendly interface.*\r\n","readmeFilename":"README.md"}