laravel-elixir

Laravel Elixir not watching SASS import files for gulp

六眼飞鱼酱① 提交于 2019-12-08 02:59:57
问题 I have elixir set up to watch changes in .scss files, but changes in _partials.scss are not being watched. elixir(function(mix){ mix.browserSync([ 'resources/assets/bower/bootstrap-sass/assets/**/*' ], { proxy: 'site.app', reloadDelay: 200 }); }); When I edit the bootstrap/_variables.scss, gulp does compile those sass changes. If I exit gulp watch, and gulp watch again, then those changes appear. So I know its compiling correctly, its just somehow not watching those partial files. Any ideas?

How can I change the public path to something containing an underscore in Laravel Mix?

馋奶兔 提交于 2019-12-06 19:20:57
问题 In Laravel 5.4 Mix was introduced to compile assets and maintain the asset pipeline. Mix defaults to your public directory being named public . In many cases, including mine, my public directory is called something else. In my case, it's public_html . How can I change the public directory where assets are compiled to? I have tried changing the paths within webpack.min.js to: mix.js('resources/assets/js/app.js', 'public_html/assets/js') .sass('resources/assets/sass/app.scss', 'public_html

Laravel Elixir wrong paths

假如想象 提交于 2019-12-06 10:05:12
This is my gulpfile.js var elixir = require('laravel-elixir'); elixir(function(mix) { mix.less([ 'style.less' ], 'public/css/style.css') .styles([ 'reset.css', 'font-awesome.min.css', 'style.css' ], 'public/css/app.css', 'public/css') .scripts(['jquery-1.12.0.min.js', 'main.js'], 'public/js/app.js', 'resources/assets/scripts') .version(['css/app.css', 'js/app.js']); }); As result I get files public/build/app-2a14246111.css public/build/app-7790e07dfb.js public/build/rev-manifest.json but when I try to add css and js files to layout <link rel="stylesheet" href="{{ elixir("css/app.css") }}">

Cache busting images which are linked inside SASS files

谁都会走 提交于 2019-12-05 17:30:14
问题 I'm fairly new to Laravel 5.0, but not to PHP. I've been playing around with Elixir to compile my SASS, copy images from my resource directory and run them through the mix.version function to prevent caching. This works great for CSS, images and JavaScript, however; is it possible to have Elixir cache-bust the images linked in my CSS/SASS as well? Sure it's easily enough to version the images but is there a way of adjusting the CSS to reflect the new filenames? I discovered this: https:/

Combining Multiple Files with Laravel Mix

ぐ巨炮叔叔 提交于 2019-12-05 15:21:51
问题 I am currently in the process of diving into Laravel Mix and so far, whilst I fully understand what Laravel Mix is and how it works, I am trying to understand a little more about the common practices and 'How-Tos'... For instance, consider this file structure: /resources/assets/js/app.js (all global functions) /resources/assets/js/index/index.js (functions specific to index.js) /resources/assets/js/about/about.js (functions specific to about.js) /resources/assets/js/contact/contact.js

Installing CKEditor with npm

旧巷老猫 提交于 2019-12-05 11:56:11
I am trying to install CKEditor in my project. I am using Laravel. I know I could download the files but I like making my life difficult and I decided that I want to install CKEditor as a npm dependency. As stated in their documentation here , I added the package to package.json, like this: "dependencies": { "jquery": "^1.11.1", "bootstrap-sass": "^3.0.0", "elixir-coffeeify": "^1.0.3", "laravel-elixir": "^4.0.0", "font-awesome": "^4.5.0", "ckeditor": "^4.5.7" } Now I guess I have to require it in my app.coffee, and so I tried: window.$ = window.jQuery = require('jquery') require('bootstrap

Combining Multiple Files with Laravel Mix

久未见 提交于 2019-12-05 01:46:39
I am currently in the process of diving into Laravel Mix and so far, whilst I fully understand what Laravel Mix is and how it works, I am trying to understand a little more about the common practices and 'How-Tos'... For instance, consider this file structure: /resources/assets/js/app.js (all global functions) /resources/assets/js/index/index.js (functions specific to index.js) /resources/assets/js/about/about.js (functions specific to about.js) /resources/assets/js/contact/contact.js (functions specific to contact.js) Now, ideally, I would like the following combined and minified in the

How can I change the public path to something containing an underscore in Laravel Mix?

这一生的挚爱 提交于 2019-12-04 23:11:39
In Laravel 5.4 Mix was introduced to compile assets and maintain the asset pipeline. Mix defaults to your public directory being named public . In many cases, including mine, my public directory is called something else. In my case, it's public_html . How can I change the public directory where assets are compiled to? I have tried changing the paths within webpack.min.js to: mix.js('resources/assets/js/app.js', 'public_html/assets/js') .sass('resources/assets/sass/app.scss', 'public_html/assets/css'); Unfortunately this compiles to: - public |- _html |-- assets |--- css |--- js |- fonts In

Delete intermediary files after elixir merge

孤街醉人 提交于 2019-12-04 13:45:10
I am using Laravel 5. During gulp task, the processed SASS files and other CSS files copied from resource folder are stored in public/css. Then all the files in the public/css are merged together to a single file as "all.css". So the files that were created needs to be deleted. How can I do this? For newer versions of laravel this worked for me: var elixir = require('laravel-elixir'); var del = require('del'); elixir.extend('remove', function(path) { new elixir.Task('remove', function() { del(path); }); }); elixir(function(mix) { mix.remove([ 'public/css', 'public/js' ]); }); Cheers! It was

Cache busting images which are linked inside SASS files

情到浓时终转凉″ 提交于 2019-12-04 00:27:54
I'm fairly new to Laravel 5.0, but not to PHP. I've been playing around with Elixir to compile my SASS, copy images from my resource directory and run them through the mix.version function to prevent caching. This works great for CSS, images and JavaScript, however; is it possible to have Elixir cache-bust the images linked in my CSS/SASS as well? Sure it's easily enough to version the images but is there a way of adjusting the CSS to reflect the new filenames? I discovered this: https://github.com/trentearl/gulp-css-url-adjuster which allows you to append a query parameter to the file paths