Skip to content

Commit

Permalink
Adding slick slider
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Moraes committed Sep 9, 2018
1 parent 9056255 commit 636f22d
Show file tree
Hide file tree
Showing 25 changed files with 2,712 additions and 2,607 deletions.
4 changes: 4 additions & 0 deletions app/config/wp/scripts-and-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
function base_camp_scripts_and_styles()
{
// Register styles
wp_register_style('slick-style', '//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.css', [], '', 'all');
wp_register_style('slick-style-theme', '//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.min.css', [], '', 'all');
wp_register_style('base-camp-styles', assets('app.css'), [], '', 'all');

// Register scripts
Expand All @@ -15,6 +17,8 @@ function base_camp_scripts_and_styles()
// Enqueue scripts and styles
wp_enqueue_script('base-camp-scripts');
wp_enqueue_script('base-camp-vendor');
wp_enqueue_style('slick-style');
// wp_enqueue_style('slick-style-theme');
wp_enqueue_style('base-camp-styles');

// comment reply script for threaded comments
Expand Down
27 changes: 20 additions & 7 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,27 @@ module.exports = {
plugins: [
new VueLoaderPlugin(),

new webpack.ProvidePlugin({
$: 'jquery',
jquery: 'jquery',
'window.jQuery': 'jquery',
jQuery: 'jquery'
}),

new CleanWebpackPlugin(['static/css/*', 'static/js/*'], {
root: path.join(__dirname, '../'),
watch: false,
watch: true,
}),

new MiniCssExtractPlugin({
filename: `css/[name].[${styleHash}].css`,
}),

new PurgecssPlugin({
paths: () =>
glob.sync(path.join(__dirname, '../resources/**/*'), { nodir: true }),
only: ['app'],
}),
// new PurgecssPlugin({
// paths: () =>
// glob.sync(path.join(__dirname, '../resources/**/*'), { nodir: true }),
// only: ['app'],
// }),

new ManifestPlugin(),

Expand All @@ -160,6 +167,12 @@ module.exports = {
port: 3000,
proxy: config.devUrl, // YOUR DEV-SERVER URL
files: ['./*.php', './resources/views/**/*.twig', './static/*.*'],
}),
},
{
injectCss: true,
injectChanges: true,
reload: false
}
),
],
};
Loading

0 comments on commit 636f22d

Please sign in to comment.