govCMS / ui-kit-base-theme

DTA UI-kit (version 1.x) based Drupal (7.x) theme
4 stars 2 forks source link

Better explain subtheme inheritance in STARTERKIT #87

Open tobybellwood opened 6 years ago

tobybellwood commented 6 years ago

We probably don't explain the inheritance of STARTERKIT/js/script.js properly in STARTERKIT/README-FIRST.txt

From https://www.drupal.org/docs/7/theming/creating-a-sub-theme:

JavaScript inheritance All JavaScript files defined in the parent theme will be inherited.

Overriding inherited JavaScript: Specify a JavaScript file with the same filename in the sub-theme's .info file. For instance, to override script.js inherited from a parent theme, add the following line to your sub-theme's .info file:

scripts[] = script.js

You will also need to create the script.js file; if you simply wish to disable the imported scripts, you can create an empty file.

rujiali commented 6 years ago

In fact, there are multiple ways to add JS. We don't have to add this empty example here. I propose we remove the JS folder, devs can add JS the way they like.