{"id":16485803,"url":"https://github.com/creeperyang/universal-css-processor","last_synced_at":"2026-06-03T20:31:38.424Z","repository":{"id":57386576,"uuid":"71908292","full_name":"creeperyang/universal-css-processor","owner":"creeperyang","description":"The universal style processor and sourcemap generator.","archived":false,"fork":false,"pushed_at":"2017-01-19T13:11:22.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-02T18:00:42.046Z","etag":null,"topics":[],"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/creeperyang.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":"2016-10-25T14:57:50.000Z","updated_at":"2018-04-23T04:34:03.000Z","dependencies_parsed_at":"2022-09-05T12:21:20.275Z","dependency_job_id":null,"html_url":"https://github.com/creeperyang/universal-css-processor","commit_stats":null,"previous_names":["creeperyang/sourcemap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/creeperyang/universal-css-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Funiversal-css-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Funiversal-css-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Funiversal-css-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Funiversal-css-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creeperyang","download_url":"https://codeload.github.com/creeperyang/universal-css-processor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creeperyang%2Funiversal-css-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33878990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"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":[],"created_at":"2024-10-11T13:27:19.518Z","updated_at":"2026-06-03T20:31:38.404Z","avatar_url":"https://github.com/creeperyang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# universal-css-processor [![Build Status](https://travis-ci.org/creeperyang/universal-css-processor.svg?branch=master)](https://travis-ci.org/creeperyang/universal-css-processor)\n\n\u003e Process sass/less/postcss and generate sourcemap correctly.\n\n## Installation\n\n```bash\nnpm i --save universal-css-processor\n```\n\n## Usage\n\n`universal-css-processor` offers a simple and universal API to handle `less/sass/postcss` and generate sourcemap.\n\n### process(glob, processors, options)\n\n- `glob` is array of globs, such as `[styles/**/*.less]`, used to find/locate files to be processed.\n- `processors` is array of processor configs. Every config is like `{ name: String, options: Object}`, and the `option` will be passed to processor. And built-in processors include `less/sass/scss/postcss/autoprefixer/minify/concat/css`.\n- `options` is the config for all processors, such as `{ map: Boolean, base: String}`.\n\nThe typical usage is below:\n\n```js\nconst ucprocessor = require('universal-css-processor')\n\nucprocessor.process(\n    // glob to list files you want to handle\n    ['test/resource/sass/*.scss', '!test/resource/sass/_*.scss'],\n    [\n        'sass', // directly specify sass processor\n        {\n            name: 'autoprefixer' // use name to specify processor\n        },\n        {\n            name: 'concat',\n            // offer options\n            options: {\n                destFile: 'all.css',\n                rebaseUrl: true\n            }\n        },\n        {\n            name: 'minify',\n            options: {\n                rename: true\n            }\n        }\n    ],\n    {\n        map: true // generate map\n    }\n).then(file =\u003e {\n    // regroup map file\n    return ucprocessor.writeMap(file, '.', {\n        destPath: 'dest'\n    }).then(mapFile =\u003e {\n        // write map file and processed style file to disk\n        mapFile.dest('dest')\n        file.dest('dest')\n    })\n})\n```\n\n## Credits\n\nSurely inspired by `gulp` and its plugins like `gulp-sourcemaps`, `gulp-postcss`, `gulp-sass` and `gulp-concat`. Most part of code is rewrited based on their codebase, and thanks for their great work.\n\nThe goal for this lib is integrating and simplifying the process of style and sourcemap.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreeperyang%2Funiversal-css-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreeperyang%2Funiversal-css-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreeperyang%2Funiversal-css-processor/lists"}