{"id":17202826,"url":"https://github.com/indus/gluex","last_synced_at":"2026-04-13T17:34:23.466Z","repository":{"id":77724211,"uuid":"90712489","full_name":"indus/gluex","owner":"indus","description":"glue your stuff together","archived":false,"fork":false,"pushed_at":"2017-05-31T09:08:27.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T09:42:33.615Z","etag":null,"topics":["cli","combine","fuse","nodejs","npm","packager"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gluex","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-09T06:52:26.000Z","updated_at":"2022-03-07T15:05:30.000Z","dependencies_parsed_at":"2023-03-05T11:00:30.095Z","dependency_job_id":null,"html_url":"https://github.com/indus/gluex","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indus%2Fgluex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indus%2Fgluex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indus%2Fgluex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indus%2Fgluex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indus","download_url":"https://codeload.github.com/indus/gluex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245431683,"owners_count":20614184,"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":["cli","combine","fuse","nodejs","npm","packager"],"created_at":"2024-10-15T02:16:04.455Z","updated_at":"2026-04-13T17:34:18.439Z","avatar_url":"https://github.com/indus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gluex\n*glue your stuff together*\n\n\u003e GLUEX is a tool to glue multiple HTML, JavaScript or JSON files (or other file types) together. It lets you use selectors to only pick a certain tag from a HTML document or a certain property from a JSON. Furthermore it allows the usage of namespaces, for example to distinguish between a development and a productive scenario. It could be used as a CLI tool as well as a module in your code.\n\n## Installation\nas a command line tool\n\n```\nnpm install gluex -g\n```\n\nas a module\n\n```\nnpm install gluex --save\n```\n\n## Usage\n\nGLUEX uses inline comment-based directives to determine which files you'd like to glue.\n\n### In a JavaScript file\n``` JS\n// @gluex path/to/file.js\n```\nor \n``` JS\n/* @gluex path/to/file.js */\n```\n\n### In a HTML file\n``` HTML\n\u003c!-- @gluex path/to/file.html --\u003e\n```\n\n### invoke as a CLI tool\n\nto glue just once:\n\n\tgluex -i path/to/input.xx -o path/to/output.xx\n\nto watch files for changes:\n\n\tgluex -i path/to/input.xx -o path/to/output.xx -w\n\nWhen watching, GLUEX will automatically watch any referenced files for changes too, and recompile the output file upon any changes to reference files.\n\n### invoke as a module\n\n``` JS \nvar gluex = require(\"gluex\"),\n\ninputPath = \"path/to/input.xx\",\noutputPath = \"path/to/output.xx\",\nnamespace = null,\nwatch = true,\n\ngluex(inputPath, outputPath, namespace, watch);\n```\n    \nif you omit the `outputPath` the glued file gets returned by the function like so...\n``` JS \nvar output = gluex(inputPath);\n```\n\n## Advanced Usage\n### Namespaces\n\n``` HTML\n\u003cbody\u003e\n\u003c!-- gluex path/to/dev_only.html --\u003e\n\u003c!-- gluex:dev path/to/dev_only.html --\u003e\n\u003c/body\u003e\n```\n\nWhen calling gluex with the namespace `dev` the first directive will be replaced with an empty string (deleted) and only the second one will be replaced with the content of the refernced file. Calling with no namespace will replace both comments and remove none. This works the same for JS. You can pass a namespace like so:\n\n#### CLI\n    gluex -i path/to/input.xx -o path/to/output.xx -n dev\n\n#### Module\n``` JS\ngluex('path/to/input.xx', 'path/to/output.xx', 'dev');\n```\n\n### Selectors\n``` HTML\n\u003chead\u003e\n    \u003ctitle\u003e\u003c!-- gluex path/to/package.json (.name) --\u003e\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003c!-- gluex path/to/partials.html (#someID) --\u003e\n\u003c/body\u003e\n```\n\nFor JSON and HTML includes you can put a selectors behind the filename (in brackets). For a JSON file the selector has to be a property path. For a HTML file you can use any CSS selector. \n\n## License\n**MIT License**\n\nCopyright (c) 2017 Stefan Keim (indus)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findus%2Fgluex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findus%2Fgluex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findus%2Fgluex/lists"}