{"id":21534530,"url":"https://github.com/winseros/gulp-armapreprocessor-plugin","last_synced_at":"2026-04-20T03:38:14.942Z","repository":{"id":17342089,"uuid":"80342461","full_name":"winseros/gulp-armapreprocessor-plugin","owner":"winseros","description":"Plugin for Gulp which allows to resolve C++ preprocessor instructions","archived":false,"fork":false,"pushed_at":"2023-01-05T01:57:49.000Z","size":883,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-09T08:05:00.720Z","etag":null,"topics":["arma","arma2","arma3","cpp","gulpplugin","preprocessor"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/winseros.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":"2017-01-29T11:30:33.000Z","updated_at":"2023-09-08T17:20:06.000Z","dependencies_parsed_at":"2023-01-13T19:17:12.941Z","dependency_job_id":null,"html_url":"https://github.com/winseros/gulp-armapreprocessor-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/winseros/gulp-armapreprocessor-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2Fgulp-armapreprocessor-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2Fgulp-armapreprocessor-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2Fgulp-armapreprocessor-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2Fgulp-armapreprocessor-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winseros","download_url":"https://codeload.github.com/winseros/gulp-armapreprocessor-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winseros%2Fgulp-armapreprocessor-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267960675,"owners_count":24172506,"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-07-30T02:00:09.044Z","response_time":70,"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":["arma","arma2","arma3","cpp","gulpplugin","preprocessor"],"created_at":"2024-11-24T03:11:07.782Z","updated_at":"2026-04-20T03:38:09.896Z","avatar_url":"https://github.com/winseros.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![node][node-image]][node-url] [![npm][npm-image]][npm-url] [![Travis branch][travis-image]][travis-url] [![Coveralls branch][coveralls-image]][coveralls-url] [![Dependencies][david-image]][david-url]\n\n# Gulp Arma Preprocessor plugin\nThe plugin's goal is to resolve [preprocessor instructions](https://community.bistudio.com/wiki/PreProcessor_Commands) of Arma2/Arma3 missions and addons source files using [Gulp](http://gulpjs.com).\n\n## Installation\n```\nnpm install gulp-armapreprocessor\n```\n\n## Usage\n```\nconst gulp = require 'gulp';\nconst preprocessor = require 'gulp-armapreprocessor';\n\ngulp.task('preprocess', () =\u003e {\n\treturn gulp.src('description.ext')\n\t  .pipe(preprocessor())\n\t  .pipe(/*further processing*/);\n});\n```\n\n## Unsupported instructions\n* [__EXEC](https://community.bistudio.com/wiki/PreProcessor_Commands#EXEC)\n* [__EVAL](https://community.bistudio.com/wiki/PreProcessor_Commands#EVAL)\n* [\\_\\_LINE\\_\\_](https://community.bistudio.com/wiki/PreProcessor_Commands#LINE)\n* [\\_\\_FILE\\_\\_](https://community.bistudio.com/wiki/PreProcessor_Commands#FILE)\n\n## Include resolution\n\nThe plugin will try to resolve `#include` statements, fetching the required files from the fyle system, relatively to the current file being processed. I.e. if you process a file `${cwd}\\src\\description.ext` and there a line `#include \"config\\defines.hpp\"` in it, the resulting file `${cwd}\\src\\config\\defines.hpp` will be fetched.\n\n## Using preprocessor cache\n\nIn some situations you may need to substitute `#include`'s content, say if the `#include`'d file has been preprocessed by another stream and has not been persisted on disk. In that case the following snippet may become handy.\n\n```\nconst gulp = require 'gulp';\nconst preprocessor = require 'gulp-armapreprocessor';\n\nconst storage = preprocessor.createStorage();\n\ngulp.task('preprocess', () =\u003e {\n    const defines = gulp.src('defines.hpp')\n        .pipe(/*some processing goes here*/)\n        .pipe(storage.add());//save the preprocessed version into a storage\n\n    const description = gulp.src('description.ext')//contains a line: #include \"defines.hpp\"\n        .pipe(preprocessor({ storage: storage }))//all the #include's will be resolved against the storage first\n        .pipe(/*further processing*/);\n\n    /*some further actions on streams*/\n});\n```\n\n## Plugin API\n### preprocessor([options])\nReturns: `PreprocessorStream`\n\n#### options\nRequired: `no`\n\n#### options.storage\nRequired: `no`\n\nType: `PreprocessorStorage`\n\n### preprocessor.createStorage()\nReturns: `PreprocessorStorage`\n\n## PreprocessorStorage API\n### storage.add()\nAdd the current stream content into the storage\n\n### storage.clear()\nClean out the storage\n\n## Known issues\nThe `#define`'s containing both `#` and `single-quote` symbols inside their values (e.g. `#define STRUCT_TEXT \"\u003ct color='#aaffaa'\u003e%1\u003c/t\u003e\"`) get corrupted while processing. To avoid, replace `single-quote` symbols with `2x double-quote`, e.g. `#define STRUCT_TEXT \"\u003ct color=\"\"#aaffaa\"\"\u003e%1\u003c/t\u003e\"`.\n\n[node-url]: https://nodejs.org\n[node-image]: https://img.shields.io/node/v/gulp-armapreprocessor.svg\n\n[npm-url]: https://www.npmjs.com/package/gulp-armapreprocessor\n[npm-image]: https://img.shields.io/npm/v/gulp-armapreprocessor.svg\n\n[travis-url]: https://travis-ci.org/winseros/gulp-armapreprocessor-plugin\n[travis-image]: https://img.shields.io/travis/winseros/gulp-armapreprocessor-plugin/master.svg\n\n[coveralls-url]: https://coveralls.io/github/winseros/gulp-armapreprocessor-plugin\n[coveralls-image]: https://img.shields.io/coveralls/winseros/gulp-armapreprocessor-plugin/master.svg\n\n[david-url]: https://david-dm.org/winseros/gulp-armapreprocessor-plugin\n[david-image]: https://david-dm.org/winseros/gulp-armapreprocessor-plugin/master.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinseros%2Fgulp-armapreprocessor-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinseros%2Fgulp-armapreprocessor-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinseros%2Fgulp-armapreprocessor-plugin/lists"}