{"id":17978356,"url":"https://github.com/ad-si/svgscript","last_synced_at":"2025-08-03T05:30:40.324Z","repository":{"id":65503731,"uuid":"59192374","full_name":"ad-si/svgscript","owner":"ad-si","description":"Tooling and workflows for generating SVGs with JavaScript modules","archived":false,"fork":false,"pushed_at":"2021-12-18T19:37:11.000Z","size":563,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-01T23:05:04.561Z","etag":null,"topics":["es-module","javascript","module","preprocessor","script","svg"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ad-si.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-19T09:23:31.000Z","updated_at":"2025-02-27T19:34:00.000Z","dependencies_parsed_at":"2023-01-26T11:15:29.711Z","dependency_job_id":null,"html_url":"https://github.com/ad-si/svgscript","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ad-si/svgscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Fsvgscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Fsvgscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Fsvgscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Fsvgscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ad-si","download_url":"https://codeload.github.com/ad-si/svgscript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ad-si%2Fsvgscript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268313300,"owners_count":24230757,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["es-module","javascript","module","preprocessor","script","svg"],"created_at":"2024-10-29T17:33:20.777Z","updated_at":"2025-08-03T05:30:39.833Z","avatar_url":"https://github.com/ad-si.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SvgScript\n\nTooling and workflows for generating SVGs with JavaScript modules.\nIncludes a hostable GUI to edit the modules in real time.\n\n\n## Installation\n\n```sh\nnpm install --global svgscript\n```\n\n\n## Usage\n\n```txt\nUsage: svgscript [command] [path-to-file/dir]\n\n[path-to-file/dir] is either a \"*.svg.js\" file,\na \"targets.yaml\" file, or a directory.\n\nCommands:\n  compile           -  Compile a SvgScript file and print to stdout\n  compile-in-place  -  Compile file(s) / directory in place\n  make              -  Build SVGs specified in targets YAML file\n  watch             -  Watch a file / directory and compile in place\n  serve             -  Start server which hosts SVGs in the browser\n\nOptions:\n  --options=[YAML] - Icon options to customize SVG output\n```\n\nTry it out with following command which compiles all modules in place:\n\n```sh\ngit clone https://github.com/ad-si/svgscript\nsvgscript compile-in-place svgscript/examples\n```\n\nOr following command which displays them with an interactive SVG viewer:\n\n```sh\nsvgscript serve svgscript/examples\n```\n\n\nOr build SVGs as described in a targets YAML file:\n\n```sh\nsvgscript make svgscript/examples/targets.yaml\n```\n\n\n## SvgScript Modules\n\nSvgScript modules are simply ECMAScript modules\nwith specific methods and properties.\nSvgScript modules must have following features:\n\n- File ending: `\u003cfile-name\u003e.svg.js`\n- Should export following properties and methods:\n  - `targetVersion`: Semver version-string of the target-version of SvgScript\n  - `default function`: Returns a valid svg file as a string\n\n- Optional methods:\n  - `component()`: Exports the main group-component of the graphic\n  - `defaults(defaultsObject)`:\n      Get or set the default configuration values of the graphic\n  - `config(configObject)`:\n      Overwrite default configuration of graphic parameters\n      or get current configuration\n\n\n## Related\n\n- [sketch-n-sketch] - Direct manipulation programming system for HTML and SVG.\n- [svgsus] - SVG organizer and optimizer for macOS.\n- [youidraw] - Vector graphic design webapp.\n\n[sketch-n-sketch]: https://ravichugh.github.io/sketch-n-sketch\n[svgsus]: http://www.svgs.us\n[youidraw]: https://site.youidraw.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fad-si%2Fsvgscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fad-si%2Fsvgscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fad-si%2Fsvgscript/lists"}