0.1.0 • Published 8 years ago

text-extractify v0.1.0

Weekly downloads
35
License
MIT
Repository
github
Last release
8 years ago

Browserify plugin to extract text into standalone files

In order to extract text from a file the file should be transformed into a JS module that doesn't require anything and exports the text as module.exports. Files transformed with stringify are suitable to be used with text-extractify.

Usage

import extractify from 'text-extractify';

browserify(entry, opts)
	.transform(stringify(['.css']))
	.plugin(extractify, opts)
	.bundle();

Options

  • dest - Output filename for the extracted file
  • [exts=[]] - List of extensions of files that should be extracted.

Complete example

import extractify from 'text-extractify';
import stringify from 'stringify';
import lessify from 'node-lessify';

browserify(entry, opts)
	.transform(stringify(['.css']))
	.transform(lessify, { textMode : true })
	.plugin(extractify, {
		exts : ['less', 'css'],
		dest : 'style.css',
	})
	.bundle();
0.1.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago