Skip to content

Commit 87a195e

Browse files
committed
2 parents d67d057 + 615251e commit 87a195e

File tree

1 file changed

+30
-12
lines changed

1 file changed

+30
-12
lines changed

README.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,49 @@
1-
# Acorn Example Package
1+
# Sage CUBE CSS Boilerplate Acorn Package
22

3-
This repo can be used to scaffold an Acorn package. See the [Acorn Package Development](https://roots.io/acorn/docs/package-development/) docs for further information.
3+
This repo can be used to integrate the [CUBE CSS Boilerplate](https://github.com/Set-Creative-Studio/cube-boilerplate/tree/main) into a Sage project. See ["A CSS project boilerplate"](https://piccalil.li/blog/a-css-project-boilerplate) by Andy Bell for an explaination of this methodology.
44

55
## Installation
66

77
You can install this package with Composer:
88

99
```bash
10-
composer require vendor-name/example-package
10+
composer require csorrentino/sage-cube-boilerplate
1111
```
1212

13-
You can publish the config file with:
13+
### New Projects
14+
15+
If it's a brand new project, you can delete app.css and tailwind.config.js before publishing the resources.
16+
17+
### Existing Projects
18+
If you've already started working on a project you'll want to look at `publishes/resources/styles/app.css` and `publishes/tailwind.config.js` to incorporate the changes manually.
19+
20+
### Publishing Tailwind.config.js and CSS resources
1421

1522
```shell
16-
$ wp acorn vendor:publish --provider="VendorName\ExamplePackage\Providers\ExampleServiceProvider"
23+
$ wp acorn vendor:publish --provider="Csorrentino\SageCubeBoilerplate\Providers\SageCubeBoilerplateServiceProvider"
1724
```
25+
### Updating bud.config
1826

19-
## Usage
27+
In your `bud.config.js` file, you'll need to add this for postcss-import-ext-glob to run in the correct order:
2028

21-
From a Blade template:
22-
23-
```blade
24-
@include('Example::example')
2529
```
30+
/**
31+
* Add postcss plugins
32+
*
33+
* @see {@link https://bud.js.org/extensions/bud-postcss#adding-a-plugin}
34+
*/
35+
app.postcss
36+
.setPlugin('postcss-import-ext-glob')
37+
.use((plugins) => ['postcss-import-ext-glob', ...plugins]);
38+
```
39+
## Additional Dev Dependencies
40+
41+
- postcss-js
42+
- postcss-imort-ext-glob
43+
- slugify
2644

27-
From WP-CLI:
45+
You can install these in your Sage theme with:
2846

2947
```shell
30-
$ wp acorn example
48+
$ yarn add postcss-js postcss-import-ext-glob slugify -D
3149
```

0 commit comments

Comments
 (0)