PHPackages                             steveperrycreative/sass-partial-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. steveperrycreative/sass-partial-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

steveperrycreative/sass-partial-manager
=======================================

A quick way to manage Sass partials.

1.0.6(9y ago)015MITPHP

Since May 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/steveperrycreative/sass-partial-manager)[ Packagist](https://packagist.org/packages/steveperrycreative/sass-partial-manager)[ RSS](/packages/steveperrycreative-sass-partial-manager/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (1)Versions (9)Used By (0)

Sass Partial Manager
====================

[](#sass-partial-manager)

A simple command line tool for managing Sass partials.

I got fed up of manually creating Sass partials and wondering why my styles weren't updating in the browser due to forgetting to add the @import into my main styles file so I created a nice little command line tool to automatically do the job.

Getting Started
---------------

[](#getting-started)

First, download the SPM installer using Composer:

`composer global require steveperrycreative/sass-partial-manager`

Then add the ~/.composer/vendor/bin directory to your $PATH so that the spm executable can be located by your system.

The easiest way to do this is with the export command:

`export PATH=$PATH:~/.composer/vendor/bin`

The spm commands will now be available in your current working directory.

Config
------

[](#config)

Add some details to your `composer.json` file as follows:

```
"spm_config": {
  "sass_directory": "wp-content/themes/themename/scss",
  "stylesheet_filename": "styles.scss",
  "sort_imports": true
}

```

- `sass_directory` is the full path to where you want your partials to be added (make sure these directories exist).
- `stylesheet_filename` is the name of your main Sass entry point file (defaults to styles.scss).
- `sort_imports` when set to true this sorts all imports alphabetically. Most users probably won't want this as it can cause cascading issues with styles so it defaults to `false`.

You can also override the stylesheet name on the command line.

Creating A New Partial
----------------------

[](#creating-a-new-partial)

It's early days so the structure of the partial directories is a bit opinionated towards how I work. This might change if anyone is interested enough.

The following example assumes that you are using WordPress with a theme called `spc`:

```
"spm_config": {
  "sass_directory": "wp-content/themes/spc/scss",
  "stylesheet_filename": "styles.scss"
}

```

`spm make:partial header` will create a new partial called `_header.scss` in a `components` folder:

`wp-content/themes/spc/scss/components/_header.scss`

And add `@import "components/header";` into your configured styles file:

`wp-content/themes/spc/scss/styles.scss`

If your styles file doesn't exist then it will be created. If it already exists then the import will be appended to the end of the file. If you try to create a partial which already exists then the command will stop running.

Specifying A Component Type
---------------------------

[](#specifying-a-component-type)

`spm make:partial homepage --type="views"` will create a new partial called `_homepage.scss` in a `views` folder:

`wp-content/themes/spc/scss/views/_homepage.scss`

And add `@import "views/homepage";` into your configured styles file:

`wp-content/themes/spc/scss/styles.scss`

Overriding The Sass Directory
-----------------------------

[](#overriding-the-sass-directory)

You can specify a one-off `sass_directory` path when creating a partial:

`spm make:partial homepage --type="views" --sass_directory="some/other/location"` will create your partial in the specified location. This will also look for the styles file in that location.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

7

Last Release

3287d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/244f2197df0d40c98d6f3defca75227820a719051d8d54eb4472e93e76a860f1?d=identicon)[steveperrycreative](/maintainers/steveperrycreative)

---

Top Contributors

[![stevemarkperry](https://avatars.githubusercontent.com/u/2418930?v=4)](https://github.com/stevemarkperry "stevemarkperry (19 commits)")

---

Tags

csssasspartials

### Embed Badge

![Health badge](/badges/steveperrycreative-sass-partial-manager/health.svg)

```
[![Health](https://phpackages.com/badges/steveperrycreative-sass-partial-manager/health.svg)](https://phpackages.com/packages/steveperrycreative-sass-partial-manager)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[php-soap/wsdl

Deals with WSDLs

183.8M18](/packages/php-soap-wsdl)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

5155.1k17](/packages/phel-lang-phel-lang)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
