0

Doing this has been a confusing mess as people just argue back and forth the best way to do it as well as people keep writing package after package after package to get JS into a laravel project. I have the following in my package.json file.

These are shogin up in my "node-modules" folder in my root directory of my laravel project.

 {
  "private": true,
  "devDependencies": {
    "gulp": "^3.8.8"
  },
  "dependencies": {
    "laravel-elixir": "^3.0.0",
    "bootstrap-sass": "^3.0.0",
    "jquery": "2.*",
    "angular":"1.4.6"
  }
}

I also have

 @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

in my app.scss file to I think pull in bootstrap.

I'm just used to a non package managed environment. Or an environment without a framework like laravel. Any help appreciated. I've read about just using BOWER but that seems like yet another level when I could just use NPM here.

BostonMacOSX
  • 1,369
  • 2
  • 17
  • 38

1 Answers1

0

Yes you can use npm as long as the package is available. Then edit your gulp file found in the root folder to compile sass,less

Visit http://laravel.com/docs/5.1/elixir to get basics of compiling the various packages css or js. Then run gulp on command line and your good to go.

Mwaa Joseph
  • 763
  • 7
  • 12