We can build assets from the Perform bundles, but what about our own?
Perform exposes a few configuration nodes to add your own assets to the build:
perform_base.assets.entrypointsperform_base.assets.namespacesperform_base.assets.extra_jsperform_base.assets.extra_sassperform_base.assets.themeNote
It’s not required to build your assets in the same way the Perform assets are built. You’re welcome to build your own assets in a different way to suit your needs.
perform.js can import javascript files, and attach the exported functions to the window.Perform object.
To include the file src/AppBundle/Resources/js/functions.js under the window.Perform.myApp property:
perform_base:
assets:
namespaces:
'my-app': '%kernel.project_dir%/src/AppBundle/Resources'
extra_js:
'myApp': 'my-app/js/functions.js'
perform.scss can include extra scss files for styling your own markup and tweaking existing styles.
To include the file src/AppBundle/Resources/scss/_extras.scss in the build:
perform_base:
assets:
namespaces:
'my-app': '%kernel.project_dir%/src/AppBundle/Resources'
extra_sass:
- '~my-app/scss/_extras'
Note
If you’re looking to change the entire look and feel of the interface, create a theme.