{"id":20778138,"url":"https://github.com/stackgl/glsl-min-stream","last_synced_at":"2025-04-30T18:41:29.663Z","repository":{"id":45367011,"uuid":"6845204","full_name":"stackgl/glsl-min-stream","owner":"stackgl","description":"through stream that transforms glsl-parser AST nodes and rewrites variables into shorter forms  ","archived":false,"fork":false,"pushed_at":"2019-06-12T01:06:23.000Z","size":60,"stargazers_count":14,"open_issues_count":5,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-04T21:02:25.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/stackgl.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":"2012-11-24T22:40:53.000Z","updated_at":"2023-11-11T12:19:53.000Z","dependencies_parsed_at":"2022-08-30T04:00:42.106Z","dependency_job_id":null,"html_url":"https://github.com/stackgl/glsl-min-stream","commit_stats":null,"previous_names":["gl-modules/glsl-min-stream"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-min-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-min-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-min-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackgl%2Fglsl-min-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackgl","download_url":"https://codeload.github.com/stackgl/glsl-min-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225041093,"owners_count":17411590,"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":[],"created_at":"2024-11-17T13:19:26.182Z","updated_at":"2024-11-17T13:19:26.730Z","avatar_url":"https://github.com/stackgl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![NPM](https://img.shields.io/npm/l/glsl-min-stream.svg) ![npm](https://img.shields.io/npm/v/glsl-min-stream.svg) ![npm](https://img.shields.io/npm/dm/glsl-min-stream.svg) [![Build Status](https://travis-ci.org/stackgl/glsl-min-stream.svg?branch=master)](https://travis-ci.org/stackgl/glsl-min-stream) [![Coverage Status](https://coveralls.io/repos/github/stackgl/glsl-min-stream/badge.svg?branch=master)](https://coveralls.io/github/stackgl/glsl-min-stream?branch=master)\n\n# glsl-min-stream\n\nTransform [glsl-parser](https://github.com/chrisdickinson/glsl-parser.git) AST nodes\non-the-fly by renaming variables into shorter forms.\n\n```javascript\nvar tokenizer = require('glsl-tokenizer/stream')\n  , parser = require('glsl-parser')\n  , deparser = require('glsl-deparser')\n  , minify = require('./index')\n\nprocess.stdin\n  .pipe(tokenizer())\n  .pipe(parser())\n  .pipe(minify())           // \u003c-- the minifier\n  .pipe(deparser(false))    // \u003c-- \"false\" == no unnecessary whitespace, please.\n  .pipe(process.stdout)\n\nprocess.stdin.resume()\n```\n\n# API\n\n### minifier = require('glsl-minifier')([safe_word_list], should_mutate_storages) -\u003e minifier stream\n\nCreate a [through stream](https://github.com/dominictarr/stream-spec#through-sync-writable-and-readable-aka-filter) that rewrites incoming declared variables.\n\n* `safe_word_list` defaults to `[\"main\"]` so that the main function is not overridden.\n* `should_mutate_storages`, a boolean defaulted to `false`, determines whether the minifier should attempt to rewrite variables declared as `varying`, `attribute`, or `uniform` (usually you do not want to do this, as the client program is expecting specific variable names).\n\n# Testing\n\nRun `npm test` to run tests\n\n---\n\nWhen adding a code change that differs the output, make sure to run tap with snapshots by running `npm run test -- --snapshot`. This will regenerate the tap-snapshot files. Make sure to commit those along with other code and test changes.\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackgl%2Fglsl-min-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackgl%2Fglsl-min-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackgl%2Fglsl-min-stream/lists"}