{"id":13468553,"url":"https://github.com/sintaxi/harp","last_synced_at":"2025-05-12T15:35:15.931Z","repository":{"id":5762673,"uuid":"6975711","full_name":"sintaxi/harp","owner":"sintaxi","description":"Static Web Server/Generator/Bundler","archived":false,"fork":false,"pushed_at":"2023-01-13T10:48:35.000Z","size":1603,"stargazers_count":4997,"open_issues_count":45,"forks_count":341,"subscribers_count":108,"default_branch":"master","last_synced_at":"2025-05-06T03:01:48.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://harpjs.com","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/sintaxi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2012-12-03T02:49:07.000Z","updated_at":"2025-05-03T02:10:49.000Z","dependencies_parsed_at":"2023-01-14T11:30:10.929Z","dependency_job_id":null,"html_url":"https://github.com/sintaxi/harp","commit_stats":null,"previous_names":[],"tags_count":104,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sintaxi%2Fharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sintaxi%2Fharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sintaxi%2Fharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sintaxi%2Fharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sintaxi","download_url":"https://codeload.github.com/sintaxi/harp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766412,"owners_count":21960911,"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-07-31T15:01:13.426Z","updated_at":"2025-05-12T15:35:15.904Z","avatar_url":"https://github.com/sintaxi.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others","Apps","By Language"],"sub_categories":["Development","JavaScript / Node.js"],"readme":"# Harp\n\n\u003e zero-configuration web server with built in pre-processing\n\n### What is Harp?\n\nHarp is a static web server that also serves Jade, Markdown, EJS, Less, Stylus, Sass, and CoffeeScript **as** HTML, CSS, and JavaScript without any configuration. It supports the beloved layout/partial paradigm and it has flexible metadata and global objects for traversing the file system and injecting custom data into templates. Optionally, Harp can also compile your project down to static assets for hosting behind any valid HTTP server.\n\n### Why?\n\nPre-compilers are becoming extremely powerful and shipping front-ends as static assets has many upsides. It's simple, it's easy to maintain, it's low risk, easy to scale, and requires low cognitive overhead. I wanted a lightweight web server that was powerful enough for me to abandon web frameworks for dead simple front-end publishing.\n\n### Features\n\n- easy installation, easy to use\n- fast and lightweight\n- robust (clean urls, intelligent path redirects)\n- built in pre-processing\n- first-class layout and partial support\n- built in LRU caching in production mode\n- can export assets to HTML/CSS/JS\n- does not require a build steps or grunt task\n- fun to use\n\n### Supported Pre-Processors\n\n- [EJS](https://ejs.co/)\n- [Jade](http://jade-lang.com/)\n- [Markdown](http://daringfireball.net/projects/markdown/) (Unsanitized)\n- [Sass (SCSS)](http://sass-lang.com/)\n- [Sass](http://sass-lang.com/)\n\n### Resources\n\n- **Server Documentation** - [harpjs.com/docs/](http://harpjs.com/docs/)\n- **Source Code** - [github.com/sintaxi/harp](https://github.com/sintaxi/harp)\n\nAuthored and maintained by [@sintaxi](http://twitter.com/sintaxi).\n\n---\n\n### Installation\n\n    sudo npm install -g harp\n\n### Quick Start\n\nStart Harp server by pointing oit\n\n    mkdir ./public\n    harp  ./public\n\nYour Harp application is now running at [http://localhost:9000](http://localhost:9000)\nYou can now fill your project with ejs, jade, md, sass, scss files to be processed autmatically.\n\nCompile your project...\n\n    harp ./public ./build\n\nYor dist folder is now ready to be published at a static host such as [Surge.sh](https://surge.sh)\n\n---\n\n## Documentation\n\nHarp can be used as a library or as a command line utility.\n\n### CLI Usage\n\n```\n \n  Harp 〜 Static Web Server v0.46.0\n\n  USAGE\n    harp \u003csource\u003e                                   serves project locally\n    harp \u003csource\u003e \u003cbuild\u003e                           compiles for static host\n\n  OPTIONS\n    -p, --port                      9000            server port to listen on\n    -h, --host                      0.0.0.0         server host to answer to\n    -s, --silent                    false           supresses logs\n    -h, --help                                      outputs this help message\n    -v, --version                                   outputs version of harp\n\n ╭───────────────────────────────────────────────────────────────────────────────╮\n │                                                                               │\n │  PROCESSING                          DATA                                     │\n │    .ejs  -\u003e  .html                     _data.json  -  directory data          │\n │    .jade -\u003e  .html                     _data.js    -  dynamic build data      │\n │    .md   -\u003e  .html                                                            │\n │    .sass -\u003e  .css                    GENERATION                               │\n │    .scss -\u003e  .css                      partial(\"_path/to/partial\", {          │\n │    .cjs  -\u003e  .js                         \"title\": \"Hello World\"               │\n │    .jsx  -\u003e  .js                       })                                     │\n │                                                                               │\n ╰───────────────────────────────────────────────────────────────────────────────╯\n\n```\n\n### Lib Usage\n\nYou may also use harp as a node library for compiling or running as a server.\n\nServe up a harp application...\n\n```js\nvar harp = require(\"harp\")\nharp.server(projectPath [,args])\nserver.listen(port, host)\n```\n\n**Or** compile harp application\n\n```js\nvar harp = require(\"harp\")\nharp.compile(projectPath [,outputPath] [, callback])\n```\n\n**Or** use as Connect/ExpressJS middleware\n\n```js\n\n```\n\n```js \n// Express\nvar express = require(\"express\");\nvar harp = require(\"harp\");\nvar app = express();\n\napp.use(express.static(__dirname + \"/public\"));\napp.use(harp.mount(__dirname + \"/public\"));\n\napp.listen(port, host)\n```\n\n\n## License\n\nCopyright © 2012–2021 [Chloi Inc](http://chloi.io). All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsintaxi%2Fharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsintaxi%2Fharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsintaxi%2Fharp/lists"}