Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,18 @@ Usage
> If you want it to match the Base Theme, the typography is done in Avenir Next Medium.

8. Remove composer.json from your new theme (no need to keep it).


Composer Script
---------------

Still experimental... does all of the above for you except #7:

```bash
> export SITE_NAME=[YOUR SITE DESCRIPTIVE NAME]
> export THEME=[YOUR CUSTOM THEME DIRECTORY NAME]
> composer require cubear/cwd_project
> cd web/themes/custom/cwd_project
> composer install-project
> composer remove cubear/cwd_project
```
20 changes: 19 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,23 @@
}
],
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"scripts": {
"install-project": [
"sed -i '' \"s/'CWD Starter Theme' # @CUSTOMIZE/'$SITE_NAME Theme'/\" cwd_project.info.yml",
"sed -i '' \"s/cwd_project/$THEME/g\" cwd_project.info.yml",
"mv cwd_project.info.yml $THEME.info.yml",
"sed -i '' \"s/project\\./$THEME\\./g\" cwd_project.libraries.yml",
"mv cwd_project.libraries.yml $THEME.libraries.yml",
"mv cwd_project.theme $THEME.theme",
"sed -i '' \"s/project/$THEME/g\" css/project.css.map",
"mv css/project.css.map css/$THEME.css.map",
"sed -i '' \"s/project\\.css\\.map/$THEME\\.css\\.map/g\" css/project.css",
"mv css/project.css css/$THEME.css",
"mv sass/project.scss sass/$THEME.scss",
"mv js/project.js js/$THEME.js",
"mv ../cwd_project ../$THEME",
"rm composer.json"
]
}
}