{"id":19219634,"url":"https://github.com/squirrel-forge/node-build-scss","last_synced_at":"2026-04-30T08:41:16.987Z","repository":{"id":57162149,"uuid":"423286537","full_name":"squirrel-forge/node-build-scss","owner":"squirrel-forge","description":"Simple sass wrapper including some useful configuration options and extended features like package support and loading files as base64 encoded strings for font and image inclusion.","archived":false,"fork":false,"pushed_at":"2023-03-30T11:11:15.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T00:45:21.386Z","etag":null,"topics":["build","cli","node","nodejs","postcss","sass","simple"],"latest_commit_sha":null,"homepage":"","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/squirrel-forge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-10-31T23:50:12.000Z","updated_at":"2022-01-29T12:45:48.000Z","dependencies_parsed_at":"2024-11-09T14:49:01.314Z","dependency_job_id":null,"html_url":"https://github.com/squirrel-forge/node-build-scss","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-build-scss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-build-scss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-build-scss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squirrel-forge%2Fnode-build-scss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squirrel-forge","download_url":"https://codeload.github.com/squirrel-forge/node-build-scss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292392,"owners_count":19778311,"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":["build","cli","node","nodejs","postcss","sass","simple"],"created_at":"2024-11-09T14:32:19.293Z","updated_at":"2026-04-30T08:41:16.961Z","avatar_url":"https://github.com/squirrel-forge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @squirrel-forge/build-scss\nSimple sass wrapper including some useful configuration options and extended features like package support and loading files as base64 encoded strings for font and image inclusion.\nMade to be compatible with node ^10.0.0, might work on higher versions, only partially tested.\n\n## Installation\n\n```\nnpm i @squirrel-forge/build-scss\n```\n\n## cli usage\n\nIf you installed globally with the *-g* option.\n```\nbuild-scss target -b --boolean --str=str,...\nbuild-scss source target -b --boolean --str=str,...\n```\n\nFor local installations use *npx* to run the build-scss executable.\n```\nnpx build-scss ...\n```\n\n### Arguments\n\nThe source argument can be a single file path or folder.\nThe target argument must be a directory and will be created if it does not exist.\n\n#### Using only one argument\n\nthe source argument is omitted and assumed to be the current working directory\n1. target - Path to write rendered and processed css files\n\n#### Using two arguments\n\n1. source - Path from where to read, if a directory, sources are selected recursively with following options:\n            ```{ exclude : /\\/_[^/]*\\.(sass|scss)$/, extensions : /\\.(sass|scss)/ }```\n2. target - Path to write rendered and processed css files\n\n### Options\n\nA long option always override the value of a short option if both are used.\n\n| Short | Long           | Type            | Description                                                                                                                                                 |\n|-------|----------------|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| -p    | --production   | bool            | Set env to production, strict, compressed, postcss and stats                                                                                                |\n| -d    | --development  | bool            | Set env to development, loose, no-postcss, with-map, experimental and stats in verbose                                                                      |\n| -e    | --env          | str             | Set custom env name                                                                                                                                         |\n| -c    | --compressed   | bool            | OutputStyle compressed                                                                                                                                      |\n| -m    | --with-map     | bool            | Generate sourcemaps                                                                                                                                         |\n|       | --no-postcss   | bool            | Disable postcss processing, the autoprefixer plugin won't run                                                                                               |\n| -x    | --experimental | bool / str, ... | Enable experimental features and load plugins, use without value or 'all' to enable all features, use comma separated list to enable specific features only |\n| -o    | --options      | 'no',str        | Load options from this path, unless set to 'no', if not set regular checks apply                                                                            |\n|       | --defaults     | bool            | Deploy plugins config to cwd or target directory                                                                                                            |\n|       | --colors       | int,int,int     | Define verbose listing color kib limits, must be 3 integers \u003e 0, default: 102400,204800,307200                                                              |\n| -s    | --stats        | bool            | Show stats output                                                                                                                                           |\n| -i    | --verbose      | bool            | Show additional info, useful during development                                                                                                             |\n| -u    | --loose        | bool            | Run in loose mode, disables the strict option and provides cleaner output when using @debug in your sass                                                    |\n| -v    | --version      | bool            | Show the application version                                                                                                                                |\n\nFor fun, it's recommended to use following command options:\n```\nbuild-scss src dist -s -i -u -x\n```\nAnd no, this was not designed this way on purpose.\n\n## NPM scripts\n\nWhen installed locally use following scripts.\n\n```\n...\n\"scripts\": {\n    \"sass:render\": \"build-scss src/scss dev/css -d\",\n    \"sass:publish\": \"build-scss src/scss dist/css -p\",\n}\n...\n```\n\n## Plugins and experimental features\n\nFollowing all documented experimental features, the builtin shorthand names are only available when using the cli command.\n\n```\nbuild-scss src/scss/ dist/css -x={all|feature},...\n```\n\n### Load files as base64 data url\n\nFeature reference: **b64**\n\nProvides a sass function *base64load($source,$mime)* that loads a file as data url, for more details check [@squirrel-forge/sass-base64-loader](https://www.npmjs.com/package/@squirrel-forge/sass-base64-loader).\n\n### Importing a package\n\nFeature reference: **pi**\n\nProvides a sass importer that will resolve package @import \"~package\" and @use \"~package\" statements, for more details check [@squirrel-forge/sass-package-importer](https://www.npmjs.com/package/@squirrel-forge/sass-package-importer).\n\n### Custom plugins\n\nYou may load custom plugins with the *-x* or *--experimental* options, you may define plugins as *reference* or *name:reference*.\nPlugins are loaded with *require* and no further custom loading is used:\n\n - Loading a plugin package: install the desired version of the package and use it's name as *reference*.\n - Loading a local file path: use an absolute path or relative to process.cwd() as reference.\n\n#### Plugin structure\n\nUse the *name:reference* syntax and define the *name* in your plugin options config to customize your the options.\n\n```javascript\n/**\n * Plugin factory sync\n * @param {Object} options - Plugin options\n * @param {Object} sassOptions - Sass options\n * @param {ScssBuilder} builder - Builder instance\n * @return {void}\n */\nmodule.exports = function plugin( options, sassOptions, builder ) {\n    \n    // Set sass options, add sass plugins, extend postcss etc\n};\n```\n\n## Api usage\n\nYou can require the ScssBuilder class in your node script and run it, change internal options and extend it easily, look at the cli implementation and code comments to understand what to run in which order, currently there will be no extended documentation on the js api, since code comments should be sufficient to understand what works in which way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquirrel-forge%2Fnode-build-scss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquirrel-forge%2Fnode-build-scss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquirrel-forge%2Fnode-build-scss/lists"}