From 3b08dffa27b5c230e95661ad8b6ef51d913f8701 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Mon, 28 Dec 2020 16:57:19 +0100 Subject: [PATCH] Prepare release v1.6.0 --- README.md | 169 +++++++++++++++++++++----------------------------- composer.json | 2 +- 2 files changed, 72 insertions(+), 99 deletions(-) diff --git a/README.md b/README.md index 3f26e5d..1161362 100644 --- a/README.md +++ b/README.md @@ -15,39 +15,29 @@ This will add this template as a dependency to your composer.json file and creat ## Advanced installation ### Define the theme name - -To define a specific theme name you should simply add the following section to your composer.json: -```json -{ - "extra": { - "theme-d8-sass": { - "project_name": "NAME_YOUR_THEME" - } - } -} +To define a specific theme name you should simply add the following section to your '.lakedrops.yml': + +```yaml +theme-d8-sass: + project_name: NAME_YOUR_THEME ``` It is best practice to add this configuration into the composer.json before you install the theme itself, otherwise you'll end up with two custom themes, one with the default name and a second one with your own theme name. - + ### Define and configure the base theme To use a different base theme than Bartik you can add the following configuration to your composer.json: -```json -{ - "extra": { - "theme-d8-sass": { - "base_theme": { - "name": "bootstrap", - "package": "drupal/bootstrap", - "starterkit": "starterkits/sass", - "sasspath": "scss", - "import": ["overrides"] - } - } - } -} +```yaml +theme-d8-sass: + base_theme: + name: bootstrap + package: drupal/bootstrap + starterkit: starterkits/sass + sasspath: scss + import: + - overrides ``` | Key | Default | Description | @@ -64,29 +54,20 @@ Note: if you're using bootstrap as your base theme, you will also have to add th Either a base theme or your own theme development style may require some libraries that are provided by [Bower](https://bower.io/search/). To add one or more Bower assets to your theme, simply add a section like this to your composer.json: -```json -{ - "extra": { - "theme-d8-sass": { - "bower_assets": { - "bootstrap-sass": { - "name": "bootstrap", - "version": "~3.3.7", - "fonts": { - "src": "assets/fonts/bootstrap" - }, - "sass": { - "src": "assets/stylesheets", - "import": ["bootstrap"] - }, - "js": { - "src": "assets/javascripts" - } - } - } - } - } -} +```yaml +theme-d8-sass: + bower_assets: + bootstrap-sass: + name: bootstrap + version: "~3.3.7" + fonts: + src: assets/fonts/bootstrap + sass: + src: assets/stylesheets + import: + - bootstrap + js: + src: assets/javascripts ``` In the above example `bootstrap-sass` in the package name from the bower package repository and it contains a dictionary of values with these options: @@ -133,79 +114,71 @@ A short list of bower assets that might be interesting to add them to your theme { "require": { "bower-asset/flat-ui-sass": "~2.1.3" - }, - "extra": { - "theme-d8-sass": { - "bower_assets": { - "flat-ui-sass": { - "name": "flat-ui", - "fonts": { - "src": "vendor/assets/fonts.flat-ui" - }, - "sass": { - "src": "vendor/assets/stylesheets", - "import": ["flat-ui"] - }, - "js": { - "src": "vendor/assets/javascripts" - } - } - } - } } } ``` +```yaml +theme-d8-sass: + bower_assets: + flat-ui-sass: + name: flat-ui + fonts: + src: vendor/assets/fonts.flat-ui + sass: + src: vendor/assets/stylesheets + import: + - flat-ui + js: + src: vendor/assets/javascripts +``` + ##### FontAwesome ```json { "require": { "bower-asset/fontawesome": "~4.7.0" - }, - "extra": { - "theme-d8-sass": { - "bower_assets": { - "fontawesome": { - "name": "fontawesome", - "fonts": { - "src": "fonts" - }, - "sass": { - "src": "scss", - "import": ["font-awesome"] - } - } - } - } } } ``` +```yaml +theme-d8-sass: + bower_assets: + fontawesome: + name: fontawesome + fonts: + src: fonts + sass: + src: scss + import: + - font-awesome +``` + ##### Animate ```json { "require": { "bower-asset/animate-sass": "~0.6.0" - }, - "extra": { - "theme-d8-sass": { - "bower_assets": { - "animate-sass": { - "name": "animate", - "sass": { - "src": "", - "import": ["animate"], - "modules": ["bounceIn"] - } - } - } - } } } ``` +```yaml +theme-d8-sass: + bower_assets: + animate-sass: + name: animate + sass: + src: '' + import: + - animate + modules: + - bounceIn +``` + For the animate package you have an additional list called `modules` which contains a list of animation modules that you want to enable for your custom theme. ## Add optional scripts @@ -242,7 +215,7 @@ At the end of the update, `gulp default` will be executed which will update your The sass compiler also knows a development and a production mode. It uses development mode by default and production mode when composer is run with the `--no-dev` command line argument, which is usually the case in production environments. -# Using Gulp +# Using Gulp Go to your theme's directory and call `gulp` once to run all of the available pre-processing. This is the equivalent of calling `gulp default`. diff --git a/composer.json b/composer.json index 7bf2b0a..2cde5e0 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,7 @@ "drupal/bootstrap": "^3.6", "drupal/chosen": "^2.4", "harvesthq/chosen": "1.8.7", - "lakedrops/composer-json-utils": "^1.7||dev-master", + "lakedrops/composer-json-utils": "^3.0||dev-master", "matthiasmullie/path-converter": "^1.0" }, "require-dev": { -- GitLab