-
Notifications
You must be signed in to change notification settings - Fork 82
Using Webpack (material components)
danielzhang130 edited this page Apr 26, 2022
·
4 revisions
Take a look at the official documentation by material. However there are some additional steps which are necessary in our project.
- Installation
npm install @material/PACKAGE NAME
-
Rebuild the docker Container
-
Styles
Add @use
and @include
statements in _base.scss, @import
statements in the specific .scss file.
- JavaScript instantiation
Create a JS file in assets/js/ and instantiate the components.
- Add entry of this file to webpack.config.js
.addEntry('ENTRY NAME', './assets/js/FILE)
- 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') }}
- Run npm:
docker exec -it app.catroweb npm run dev
- After you finished implementation, you need to push the generated files from public/build/ to git
Check out /share.catrob.at/pocketcode/
- Docker - Linux/Mac/Windows
- Ubuntu - VM/Native
- Installing Elasticsearch
- Server Setup
- Using Webpack (material components)