{"id":19632899,"url":"https://github.com/foundation/octophant","last_synced_at":"2025-10-20T05:53:47.618Z","repository":{"id":57152867,"uuid":"28216211","full_name":"foundation/octophant","owner":"foundation","description":"Collects variables from SCSS files and combines them into one settings file.","archived":false,"fork":false,"pushed_at":"2017-06-21T21:23:41.000Z","size":69,"stargazers_count":23,"open_issues_count":4,"forks_count":6,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-16T14:40:57.922Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foundation.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":"2014-12-19T05:46:41.000Z","updated_at":"2021-12-18T04:23:11.000Z","dependencies_parsed_at":"2022-09-06T20:51:29.745Z","dependency_job_id":null,"html_url":"https://github.com/foundation/octophant","commit_stats":null,"previous_names":["zurb/octophant"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Foctophant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Foctophant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Foctophant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation%2Foctophant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foundation","download_url":"https://codeload.github.com/foundation/octophant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251271082,"owners_count":21562487,"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-11T12:15:42.228Z","updated_at":"2025-10-20T05:53:47.523Z","avatar_url":"https://github.com/foundation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Octophant](https://raw.githubusercontent.com/zurb/octophant/master/assets/octophant.jpg)\n\n[![Build Status](https://travis-ci.org/zurb/octophant.svg?branch=master)](https://travis-ci.org/zurb/octophant)\n\nOnce banished to ZURB's *Creatures of Nightmare* as a freakish outcast, the Octophant has found its calling as a file generator. Nimble and flexible, the Octophant uses its many trunks to gather a framework's many Sass variables, aggregating them into one file.\n\nWe make use of the Octophant's talents at ZURB with the [Foundation](http://foundation.zurb.com) family of front-end frameworks, to automatically generate settings files.\n\nTo summon the Octophant in your own project, run `npm install octophant`.\n\n## Setup\n\nVariables are parsed using SassDoc, which means any variable you want to be found must be documented with a comment that has three slashes.\n\n```scss\n/// This variable will be found by the parser.\n$primary-color: blue;\n\n// This one won't.\n$private-value: 10px;\n```\n\nVariables are grouped by component. The component is defined by the `@group` a variable belongs to. The group can be set on individual variables, or on every variable in a file using a poster comment.\n\nWhen writing the file, Octophant automatically converts hyphens in group names to spaces, and then capitalizes each word. So `menu-bar` becomes `Menu Bar`. You can also define custom names for each group with the `groups` option.\n\n```scss\n////\n/// @group button\n////\n\n/// Button background\n$button-background: blue;\n\n/// Button color\n$button-color: white;\n```\n\n## Usage\n\n### parser(files [, options, cb])\n\nParses a set of files and creates a new SCSS file with all of the collected variables in one place. This value is passed directly to the SassDoc parser, which accepts a directory name, or a glob pattern of files.\n\n#### files\n\n**Type:** `Array` or `String`\n\nOne or more [globs](https://github.com/isaacs/node-glob) to parse.\n\n#### options\n\n**Type:** `Object`\n\n- `title` (`String`): Title to print at the top of the file.\n- `output` (`String`): Path relative to the CWD to output the settings file to.\n- `groups` (`Object`): A set of key/value pairs for the sections of the settings file. Each key is a SassDoc group, and the value is an expanded name.\n- `imports` (`Array`): A series of strings which represent Sass libraries to import. These libraries are added as `@import` statements before the first section.\n- `sort` (`Array`): A series of strings which represent sections that should be floated to the top. You don't need to define every group here; groups left out of `sort` will remain alphabetical.\n\n#### cb\n\n**Type:** `Function`\n\nCallback to run when the file has been written to disk.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundation%2Foctophant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoundation%2Foctophant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundation%2Foctophant/lists"}