requesting all the main files of node_modules

0

I have installed some dependencies with NPM , these dependencies are basic, like bootstrap, animatecss and others ...

Anyway, I'd like to know how I can call these dependencies in a simple way. since I'm using this type of call:

import 'node_modules/chosen-js/chosen.jquery.js';
import 'node_modules/hammerjs/hammer.min.js';
import 'node_modules/hammerjs/hammer.min.js';

and in the css folder:

@import '../node_modules/css/font-awesome.min.css';
@import '../node_modules/dist/css/materialize.min.css';
@import '../node_modules/dist/css/materialize.min.css';
@import '../node_modules/slick/slick.css';

I saw something about require and tals, but I did not quite understand how it works.

    
asked by anonymous 04.07.2017 / 03:26

1 answer

0

root @ sdv7 [~ / node / node_modules / live_webcam] # npm install body-parser --save

All installed modules are inside node_modules so to call it looks like below:

In your APP Node file:

    const   bodyParser  = require('body-parser');

The bodyParser variable now contains the methods of the module. I use it so I'm new to node but I think it's correct!

Hugs

    
04.07.2017 / 04:08