installing @angular2-material using package.json and npm

Trying to build my css file from @angular2-material using a script in package.json. However, I’m not able to get a working configuration. Here is my build script:

"scripts":{
    "build:css": "node-sass --include-path node_modules --output client/styles client/styles/main.scss client/styles/bundle.css"
}

My main.scss looks like this:

@import "node_modules/@angular2-material/core/style/core.scss";
@import "node_modules/@angular2-material/checkbox/checkbox.scss";

Does anyone have a working configuration?

Same question as https://stackoverflow.com/questions/36240568/meteor-1-3-and-the-use-of-the-npm-module-angular2-material that was closed by moderators but which has now been viewed 86x. I’d say there is a wish to know how to do this? I’d be disappointed if this question gets closed!! Might revert to raising on the project git if it is.

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Jason Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jason
Guest

in webpack
simply do in app.module.ts

import {MaterialModule) from ‘@angular/material’;

imports:[MaterialModule.forRoot()]

Thats it , now use material component anywhere