preboot / angularjs-webpack

A complete, yet simple, starter for AngularJS using webpack
MIT License
1.71k stars 658 forks source link

What is the best practice and right way to use this template? #94

Closed tomavic closed 6 years ago

tomavic commented 6 years ago

Hi

I have a web app project which had been built using this template. Now I need an answer for 3 points:

Do I need to add script / link tags into index.html ?

How to include external angular/non-angular libraries ?

How to include external css files such as bootstrap.css ?

How to use sass instead of css ?

phra commented 6 years ago

@tomavic this project is configured with webpack, so you have to use the es6 module syntax to work with it. have a look here: https://webpack.js.org/guides/getting-started/

tomavic commented 6 years ago

Hi @phra

I know well it's based on webpack and ES6 and that's so obvious Before, I used John Papa Angular 1.x style guide. and now i found this new way contradict with that style guide in which you should wrap your modules in IIFE

that was my main question

my second is how to use sass instead of css

Thanks in advance

phra commented 6 years ago

you can use a postcss plugin called precss or use the regular sass-loader.

i suggest the first option because it's pure javascript. (no libsass, ruby-sass, no compilation steps during install).

you have to follow the relative README.md of the library that you want to use.