Laravel 5: Elixir. How to reference a css file from node_modules directory -


i using css file import through npm. respectively saved in "/node_modules" directory.

i want compile file other scss files elixir , searching way, how include properly.

the options is:

  1. rename file file.css file.scss , import in app.scss
  2. copy file.css file "resources/assets/" directory, rename scss , include in sass compilation this:

now want know, if there way reference file "node_modules" directory, without touching file, because want other people download project , use "composer install" , "npm install" , running.

or common way handle this, copy every required file "node_modules" directory resources/assets folder? seems odd, since included bootstrap file of laravel framework added through scss import in app.scss file.

now want same, scss files can't import css files, have in case, require me rename it, not work out of box on other environment, since "node_modules" directory not included in version control.

any recommendations, on best way compile css files in "node_modules" directory?

if @ elixir documentation notice there many handy functions can use. 1 of them mix.copy() function (you can copy single file or whole directory, example whole jquery folder).

elixir(function(mix) {     mix.copy('node_modules/blabla/file.scss', 'resources/assets/sass/file.scss');     mix.sass(['file.scss', 'app.scss']); }); 

this way each time call gulp first copy scss file node_modules dir , compile sass.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -