Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 810 Bytes

File metadata and controls

37 lines (24 loc) · 810 Bytes

Take a look at the official documentation by material. However there are some additional steps which are necessary in our project.

  1. Installation
yarn add @material/PACKAGE_NAME
  1. Rebuild the docker Container

  2. Styles

Add @use and @include statements in _base.scss, @import statements in the specific .scss file.

  1. JavaScript instantiation

Create a JS file in assets/js/ and instantiate the components.

  1. Add entry of this file to webpack.config.js
.addEntry('ENTRY NAME', './assets/js/FILE)
  1. Edit the html.twig file Add the html to your html.twig file. Insert into the js block at the end of the file:
{{ encore_entry_script_tags('ENTRY NAME') }}
  1. Run the asset build:
docker exec -it app.catroweb yarn dev