How to find the SCSS of a node module?


#1

Hi,

I’m currently trying to implement a carousel in my application and for now, I’m testing stuff inside the demo project given with the module :

I can directly modify the module css which is there : src/app/modules/ngx-carousel-3d/ngx-carousel-3d-slides/ngx-carousel-3d-slides.component.scss

But now that I want to take those modifications to my own project, I only find “ngx-carousel-3d-slides.component.d.ts” in :
node_modules/ngx-carousel-3d/src/app/modules/ngx-carousel-3d/ngx-carousel-3d-slides/

I don’t know where to find the scss.

Thanks.


#2

See: https://github.com/bruckwubete/ngx-carousel-3d/blob/master/src/app/modules/ngx-carousel-3d/ngx-carousel-3d.component.scss


#3

Yes, that is where I do my modifications.
The problem is that I can’t find the same file in the node_modules after I installed ngx-carousel-3d with npm.

I also tried to simply add the modules directory from the demo project into my own project but I just have a white screen directly at launch so I guess I didn’t import it correctly.


#4

You usually install a build of a library, not its source code. So if you want to mess with the source, you have to fork the code, do your modifications, built and publish it and install that in your project.


#5

Thank you, that’s clearer.
Is it possible just to copy/paste the module folder and import it in my project ?
I’m not familiar with publishing a build on github.

I tried this :
app.module.ts

import { NgxCarousel3dModule } from '../modules/ngx-carousel-3d/ngx-carousel-3d.module';

imports: [
BrowserModule,
NgxCarousel3dModule,
IonicModule.forRoot(MyApp),
],

but I only have a blank page at launch.