relateiq/riq-partialify

Name: riq-partialify

Owner: SalesforceIQ

Description: because the author of partialify makes me faceclap

Created: 2015-07-22 18:11:02.0

Updated: 2016-10-26 23:57:22.0

Pushed: 2017-03-08 01:06:29.0

Homepage: null

Size: 19

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

partialify

require()-able HTML, CSS and (potentially) more

Supports HTML and CSS out of the box, enabling code like this.

html = require('./some.html'),
css = require('./some.css');

To use, specify as a Browserify transform in your package.json or programmatically like so:

b = require('browserify')(),
fs = require('fs'),
p = require('partialify');

d('./entry.js');
ansform(p);
ndle().pipe(fs.createWriteStream('./bundle.js'));

To support other file types use the custom version. You can either augment the default supported file types or specify a completely custom list.

b = require('browserify')(),
fs = require('fs'),
p = require('partialify/custom');

d('./entry.js');

ansform(p.alsoAllow('xml'));
r
ansform(p.alsoAllow(['xml', 'csv']));
r
ansform(p.onlyAllow(['xml', 'csv']));

ndle().pipe(fs.createWriteStream('./bundle.js'));

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.