{"id":19132858,"url":"https://github.com/dthung1602/sqss","last_synced_at":"2025-05-06T18:14:51.734Z","repository":{"id":55192189,"uuid":"502556402","full_name":"dthung1602/sqss","owner":"dthung1602","description":"Style your HTML with some good old SQL","archived":false,"fork":false,"pushed_at":"2022-09-06T14:22:38.000Z","size":688,"stargazers_count":31,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T18:14:46.769Z","etag":null,"topics":["css","parser","sql","transpiler"],"latest_commit_sha":null,"homepage":"https://dthung1602.github.io/sqss/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dthung1602.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-12T08:11:13.000Z","updated_at":"2024-03-18T15:17:35.000Z","dependencies_parsed_at":"2023-01-17T21:30:12.441Z","dependency_job_id":null,"html_url":"https://github.com/dthung1602/sqss","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fsqss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fsqss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fsqss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthung1602%2Fsqss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dthung1602","download_url":"https://codeload.github.com/dthung1602/sqss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741473,"owners_count":21797027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","parser","sql","transpiler"],"created_at":"2024-11-09T06:19:53.741Z","updated_at":"2025-05-06T18:14:51.710Z","avatar_url":"https://github.com/dthung1602.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- README template from https://github.com/dthung1602/sqss --\u003e\n\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![WTFPL License][license-shield]][license-url]\n[![NPM][npm-shield]][npm-url]\n[![TypeScript][typescript-shield]][npm-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/img/logo.png\" alt=\"SQSS\" width=\"300\"\u003e\n\u003c/p\u003e\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## What is this?\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cp\u003eStructured Query Style Sheet\u003c/p\u003e\n    \u003cp\u003eStyle your HTML with some good old SQL !\u003c/p\u003e\n    \u003ca href=\"https://dthung1602.github.io/sqss/playground.html\" target=\"_blank\"\u003e\u003cb\u003eTry it in your browser!\u003c/b\u003e\u003c/a\u003e\n    \u003cbr /\u003e    \n    \u003cbr /\u003e    \n    • \u0026nbsp; \u003ca href=\"https://dthung1602.github.io/sqss/\" target=\"_blank\"\u003eProject homepage\u003c/a\u003e\n    \u0026nbsp; • \u0026nbsp;\n    \u003ca href=\"https://www.npmjs.com/package/@dthung1602/sqss\" target=\"_blank\"\u003eNPM Package\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003cimg src=\"docs/img/demo.png\" width=\"500\" /\u003e\n\u003c/div\u003e\n\n## But why?\n\nWhy not?\n\nAfter all [Cascading Server Sheets](https://dev.to/thormeier/dont-try-this-at-home-css-as-the-backend-what-3oih) is a\nreal thing, you know.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"docs/img/comic.png\" width=\"300\"/\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://www.smbc-comics.com/comic/qc\" target=\"_blank\"\u003eSauce for 🍝\u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n- For all supported features, see [examples.md](https://github.com/dthung1602/sqss/blob/master/example.md) or the \n[Online Documentation](https://dthung1602.github.io/sqss/documentation.html#supported-features)\n\n- To try SQSS in browser visit [playground page](https://dthung1602.github.io/sqss/playground.html)\n\n- To include the transpiler on your website, add the following line:\n\n```html\n\u003c!-- To use the latest version--\u003e\n\u003cscript src=\"https://unpkg.com/@dthung1602/sqss/dist/bundle/index.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Or to specify a version --\u003e\n\u003cscript src=\"https://unpkg.com/@dthung1602/sqss@\u003cversion go here\u003e/dist/bundle/index.js\"\u003e\u003c/script\u003e\n\n\u003c!-- `transpileSQSSToCSS` is now available in your global scope!--\u003e\n\u003c!-- To add style to your website, use the following snippet--\u003e\n\u003cscript\u003e\n   const sqlString = `\n        -- All of your styles go here\n        UPDATE styles\n        SET \"background\" = 'blue'\n        WHERE class = 'target';\n   `;\n   \n   const cssString = transpileSQSSToCSS(sqlString);\n   document.head.innerHTML += `\u003cstyle\u003e${cssString}\u003c/style\u003e`;\n\u003c/script\u003e\n```\n\n- Or you can install from `npm`:\n\n```bash\n$ npm i @dthung1602/sqss\n# or yarn\n$ yarn add @dthung1602/sqss\n```\n\n- To use it in your project, call the transpile function in your build script:\n\n```js\nconst sqss = require(\"@dthung1602/sqss\");\nconst fs = require(\"fs\");\n\nconst sqlString = fs.readFileSync(\"path/to/your/stylesheet.sql\", \"utf-8\");\nconst cssString = sqss.transpileSQSSToCSS(sqlString);\n\nfs.writeFileSync(\"path/to/your/build/folder/output.css\", cssString);\n```\n\n**TypeScript is supported**\n\n```ts\nimport { transpileSQSSToCSS } from \"@dthung1602/sqss\";\nconst css: string = transpileSQSSToCSS(`UPDATE styles SET color = 'blue' where id = 'target';`);\n```\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the WTFPL License.\n\n**You just DO WHAT THE F*CK YOU WANT TO**\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nAny contributions you make are greatly appreciated.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\n\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nDuong Thanh Hung - [dthung1602@gmail.com](mailto:dthung1602@gmail.com)\n\nProject Link: [https://github.com/dthung1602/sqss](https://github.com/dthung1602/sqss)\n\n\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n## Acknowledgements\n* [Cascading Server Sheets](https://dev.to/thormeier/dont-try-this-at-home-css-as-the-backend-what-3oih)\n* [IaSQL](https://iasql.com/)\n* [Introduction to Compilers and Language Design](https://www3.nd.edu/~dthain/compilerbook/)\n* [SMBC Comics](https://www.smbc-comics.com/comic/qc)\n* [Font awesome](https://fontawesome.com/icons)\n* [Color hunt](https://colorhunt.co)\n* [Ace editor](https://ace.c9.io/)\n* [Highlight js](https://highlightjs.org/)\n* [Img Shields](https://shields.io)\n* [Best README template](https://github.com/othneildrew/Best-README-Template)\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/dthung1602/sqss.svg?style=flat-square\n[contributors-url]: https://github.com/dthung1602/sqss/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/dthung1602/sqss.svg?style=flat-square\n[forks-url]: https://github.com/dthung1602/sqss/network/members\n[stars-shield]: https://img.shields.io/github/stars/dthung1602/sqss.svg?style=flat-square\n[stars-url]: https://github.com/dthung1602/sqss/stargazers\n[issues-shield]: https://img.shields.io/github/issues/dthung1602/sqss.svg?style=flat-square\n[issues-url]: https://github.com/dthung1602/sqss/issues\n[license-shield]: https://img.shields.io/github/license/dthung1602/sqss.svg?style=flat-square\n[license-url]: https://github.com/dthung1602/sqss/blob/master/LICENSE\n[typescript-shield]: https://img.shields.io/npm/types/@dthung1602/sqss?style=flat-square\n[npm-url]: https://www.npmjs.com/package/@dthung1602/sqss\n[npm-shield]: https://img.shields.io/npm/v/@dthung1602/sqss?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthung1602%2Fsqss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdthung1602%2Fsqss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthung1602%2Fsqss/lists"}