Im trying to install Modernizr in my project with JSPM but I cant seem to find any documentation on this.
Ive tried both jspm install modernizr and jspm install npm:modernizr. Both download the Modernizr files but then I cant load it into my page.
Ive tried this in my main JS file but I keep getting a node error when I try and compile as it cant find the right files.
import 'modernizr';
import Modernizr from 'modernizr';
new Modernizr;
As I understand JSPM is a pollyfill that allows you to use ES6's module imports. Can Modernizr be imported as a module?
As Modernizr needs to run in the head I dont think its possible to use JSPM for this. Im going to use gulp modernizr instead:
https://github.com/doctyper/gulp-modernizr
Related
While i was trying to #use "sass:math"; module in scss file this was not working. This shows some error.I belive i donot have the access for build in module. I attached some screenshots. At that moment i need some help for solving this dilemma.Also that syntax was not highlighting.
First image:not highlighting
Second image:error message
note- my sass verstion is Ruby Sass 3.7.4
I need a solution as fast as possible.
I can't get ruby running and i dont want to go through all the hurdles of fighting with my osx version of ruby.
I downloaded dart sass which has no support for compass since it's deprecated. I'm trying to get my old sass code to work while I work on replace all my mixin that I used that rely on compass.
Is there a way I can download the compass/css3 mixin stylesheet?
I found their site http://compass-style.org/reference/compass/css3/ other than going through each page and copying all the code. Is there no master code file that I can download all the mixins?
Thank you.
I'm completely new to laravel mix and npm in general so I'm at total loss here.
I'm using jquery plugins such as: https://github.com/noraesae/perfect-scrollbar
Now, I installed laravel mix since I needed laravel echo.
Got that working and running up, but since then the jquery plugins are not loading, all I'm getting is:
Uncaught TypeError: $(...).perfectScrollbar is not a function
I don't know, is this perhaps that the jquery is now loaded async and Mix overwrites the one which I have set up /div> way?
However, I noticed I could perhaps install this plugin via npm due to documentation via:
npm install perfect-scrollbar
I did that, it installed but how can I now possibly include it so that laravel mix loads it as well? I've spent the last 6 hours trying to find a way but I just can't understand how to do this. Any help would be greatly appreciated!
Ok... not sure I get where your problem is but here is a few things you can check...
First, mix will run webpack... wbpack.mix.js ... which will contain something like this if you did not change it:
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
Now, this will run webpack and compile your resources... in the case we are interested in here, app.js.
Did you include your library (perfect-scrollbar) in app.js as suggested in the perfect scrollbar doc?
var Ps = require('perfect-scrollbar');
You will also need to take care of the css for it as well.. by importing it in your app.scss ... if you are using sass as in the standard laravel install...
#import "node_modules/perfect-scrollbar/src/css/main.scss"
Rebuild and you should be good to go if you use Ps as the perfect-scrollbar object. You can also add it to the window instead... like window.Ps = require...
npm install just installs the package in your node_modules directory. Once there, you must import them into your compiled css and js application file.
Hope this helps.
I am new to SASS. I am using this as a guide to learn Bourbon -
http://www.git-tower.com/learn/bourbon-neat-bitters/getting-ready/introduction
I followed all the instructions and it displays fine on my local machine. But when I edit _layout.scss, it doesn't compile to styles.css. I installed Compass and had it watch the project folder, but same results. My changes won't take.
Am I missing a step?
This is likely more of a sass importing/file-name issue than anything specifically with bourbon. I'd check out http://sass-lang.com/guide . Sass-lang put together a really nice guide to sass that includes things like imports, etc.
Also, Compass app can bring some things to the party that can conflict with Bourbon. I'd recommend using the sass app or a desktop app like https://prepros.io which can be easier starting out.
Hope this helps 🍻
I'm using Scout as SASS compiler. I would like to know if there's a way to configure Scout to work with DevTools Sass support.(Auto reload css upon save). I assume installing Scout should install Compass and SASS in my machine. When I tried 'compass' in the terminal, I get 'compass: command not found'.
Do I have to install sass separately for this to work?
Thanks a lot!
Thanks for the response guys. It seems like the version of SASS ScoutApp is using doesnt have source map support. According to this article, you need Sass 3.3.