Last active
March 19, 2019 10:11
-
-
Save vanaf1979/49a927d96621f60cb57af842b16840e3 to your computer and use it in GitHub Desktop.
Gist for my "WordPress: Laravel Mix, Sass and ES6 Modules in theme development" tutorial at Medium http://bit.ly/wplaravelmixtut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mix_tutorial_enqueue_scripts() { | |
$theme = wp_get_theme(); | |
wp_enqueue_script( $theme->get('TextDomain') . '-manifest' , get_template_directory_uri() . '/public/js/manifest.js' , array() , $theme->get('Version') , true ); | |
wp_enqueue_script( $theme->get('TextDomain') . '-vendor' , get_template_directory_uri() . '/public/js/vendor.js' , array() , $theme->get('Version') , true ); | |
wp_enqueue_script( $theme->get('TextDomain') . '-app' , get_template_directory_uri() . '/public/js/app.js' , array() , $theme->get('Version') , true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'mix_tutorial_enqueue_scripts' ); | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment