New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webpack-entry

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-entry

Support folder directory as webpack's entrance.

latest
Source
npmnpm
Version
1.1.5
Version published
Maintainers
1
Created
Source

webpack-entry introduction

webpack-entry is a module support folder directory as webpack's entrance.

folder directory

The page folder directory structure.

|____app.js
|____app.less
|____home
| |____home.js
| |____home.less
|____index
| |____index.js
| |____index.less
| |____second
| | |____second.js
| | |____second.less

Usage

var getEntries = require('webpack-entry');
var entry = getEntries(path.join(__dirname, 'page'));

output

{ app: './page/app.js',
  home: './page/home/home.js',
  index: './page/index/index.js',
  second: './page/index/second/second.js' 
}

folder directory

The page folder directory structure.

|____home
| |____admin
| | |____index.js
| |____index.js
|____index
| |____index.js

Usage

var getEntries = require('webpack-entry');
var entry = getEntries(path.join(__dirname, 'page'), {dirAsKey: true});

output

{ admin: '/page/home/admin/index.js',
  home: '/page/home/index.js',
  index: '/page/index/index.js' }

Keywords

webpack

FAQs

Package last updated on 08 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts