list-loader

1.0.9 • Public • Published

List Loader

npm Build Status Coverage Status Maintainability

Introduction

A webpack-loader for importing files as a list

Usage

Install

$ npm install list-loader --save-dev

Setup

webpack.config.js

'module': {
	'rules': [
		{
			'test': /\.txt$/,
			'use': [
				{
					'loader': 'list-loader',
					'options': {
						'delimiter': '\n',
						'filter': false,
						'trim': true,
						'number': false,
						'date': false,
					},
				},
			],
		},
	],
},

Options

Name Type Default Description
delimiter {string|number|RegExp} '\n' Set delimiter
filter {boolean} false Enable / Disable filtering empty elements
trim {boolean} true Enable / Disable trimming
number {boolean} false Enable / Disable parsing numbers
date {boolean} false Enable / Disable parsing dates

Readme

Keywords

Package Sidebar

Install

npm i list-loader

Weekly Downloads

0

Version

1.0.9

License

MIT

Unpacked Size

5.09 kB

Total Files

4

Last publish

Collaborators

  • sapphire-sh