{"id":18723194,"url":"https://github.com/jf990/highlightjs-arcade","last_synced_at":"2025-11-11T07:30:20.260Z","repository":{"id":45216421,"uuid":"206412967","full_name":"jf990/highlightjs-arcade","owner":"jf990","description":"highlight.js repo for Esri's ArcGIS Arcade expression language","archived":false,"fork":false,"pushed_at":"2023-03-14T18:17:02.000Z","size":247,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T12:26:25.511Z","etag":null,"topics":["arcgis-arcade","highlight-language","highlightjs","webpage"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jf990.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":"2019-09-04T20:59:52.000Z","updated_at":"2023-09-28T09:07:11.000Z","dependencies_parsed_at":"2024-12-28T12:35:40.989Z","dependency_job_id":null,"html_url":"https://github.com/jf990/highlightjs-arcade","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jf990%2Fhighlightjs-arcade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jf990%2Fhighlightjs-arcade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jf990%2Fhighlightjs-arcade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jf990%2Fhighlightjs-arcade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jf990","download_url":"https://codeload.github.com/jf990/highlightjs-arcade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239587230,"owners_count":19663892,"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":["arcgis-arcade","highlight-language","highlightjs","webpage"],"created_at":"2024-11-07T13:48:00.275Z","updated_at":"2025-11-11T07:30:20.208Z","avatar_url":"https://github.com/jf990.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# highlightjs-arcade\n\n[![License](https://badgen.net/badge/license/Apache-2.0/blue)](https://github.com/jf990/highlightjs-arcade/blob/master/LICENSE)\n[![Language](https://badgen.net/badge/language/Arcade-1.16.0/purple)](https://developers.arcgis.com/arcade/)\n\n\u003e NOTE: ArcGIS Arcade official syntax highlighting is at https://github.com/highlightjs/highlight.js/blob/main/src/languages/arcade.js, this repo is only a work in progress and is not the official.\n\nSupport for using `highlight.js` to syntax highlight Esri's ArcGIS Arcade scripts. See https://highlightjs.org/ for more information about highlight.js. See [ArcGIS Arcade](https://developers.arcgis.com/arcade/) for more information about the ArcGIS Arcade scripting language.\n\n## Installation\n\nInclude the `highlight.js` script package in your webpage or node app, load this module and register it with `hljs`.\n\nThis ArcGIS Arcade module is not part of the standard distribution and must be loaded separately. The module name is `arcade.min.js` or `arcade`, depending on how you reference the module from your bundler code.\n\n### Static website\n\nLoad the `arcade` module after loading Highlight.js.  Use the minified version found in the `dist` directory.  This module is just a CDN build of the language, so it will register itself as the JavaScript is loaded.\n\n```html\n\u003cscript type=\"text/javascript\" src=\"/path/to/highlight.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"/path/to/arcade.min.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\"\u003e\n  hljs.highlightAll();\n\u003c/script\u003e\n```\n\nView a sample of this by loading `index.html` found in the `sample` folder.\n\n### Using directly from the UNPKG CDN\n\n```html\n\u003cscript type=\"text/javascript\"\n  src=\"https://unpkg.com/highlightjs-arcade@1.16.0/dist/arcade.min.js\"\u003e\u003c/script\u003e\n```\n\n- More info: \u003chttps://unpkg.com\u003e\n\n### With Node.js or another build system\n\nIf you're using Node.js / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.\n\n```javascript\nconst hljs = require('highlight.js');\nconst hljsArcade = require('highlightjs-arcade');\n\nhljs.highlightAll();\n```\n\nTo view a sample of this workflow, you will be required to have previously installed node and webpack.\n\n```bash\ncd sample\nnpm install\nnpm run build\n```\n\nThen view `sample/dist/index.html` from a browser.\n\n## Usage\n\nOnce loaded, mark the code you want to highlight with the `language-arcade` class:\n\n```html\n\u003cpre\u003e\u003ccode class=\"language-arcade\"\u003e... example arcade code here ...\u003c/code\u003e\u003c/pre\u003e\n```\n\nor use JavaScript to dynamically highlight text:\n\n```javascript\nhljs.registerLanguage('arcade', window.hljsArcade);\nvar highlighted = hljs.highlightAuto(text, [\"arcade\"]);\n```\n\nWithout specifying the language, Highlight.js will attempt to auto-detect the grammar. To avoid mis-detecting Arcade and getting an unexpected result, always specify `arcade` or `language-arcade`.\n\nFor more information, follow instructions at [highlightjs.org](https://highlightjs.org/usage/) to learn how to include the library and CSS and other use cases. See [Getting started](https://github.com/highlightjs/highlight.js#getting-started) for different integration and module options.\n\n## Contributing\n\n[Contributions welcome](https://github.com/esri/contributing). Download this repo and install the dependencies:\n\n```bash\nnpm install\n```\n\nUpdate `src/language/arcade.js`. Be sure to update the test data `test/markup` and `test/detect` files to include a test for your changes, or create a new test in `spec/arcade-spec.js`. Run the local test with\n\n```bash\nnpm test\n```\n\nThe tests must pass!\n\nTo build the distribution, follow instructions at [Highlight.js 3rd Party Quick Start](https://github.com/highlightjs/highlight.js/blob/master/extra/3RD_PARTY_QUICK_START.md).\n\nIssue a pull request.\n\n## License\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) (the \"License\"); you may not use this file except in compliance with the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjf990%2Fhighlightjs-arcade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjf990%2Fhighlightjs-arcade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjf990%2Fhighlightjs-arcade/lists"}