Comparing version 6.0.2 to 6.1.0
@@ -19,2 +19,8 @@ const cssPrefix = require('postcss-prefix') | ||
function sheetify (src, filename, options, done) { | ||
// browserify transform | ||
if (typeof src === 'string' && !/\n/.test(src) && filename && filename._flags) { | ||
var args = Array.prototype.slice.apply(arguments) | ||
return require('./transform.js').apply(this, args) | ||
} | ||
// handle tagged template calls directly from Node | ||
@@ -21,0 +27,0 @@ const isTemplate = Array.isArray(src) |
{ | ||
"name": "sheetify", | ||
"version": "6.0.2", | ||
"version": "6.1.0", | ||
"description": "Modular CSS bundler", | ||
@@ -5,0 +5,0 @@ "repository": "stackcss/sheetify", |
@@ -39,5 +39,5 @@ # sheetify | ||
Compile with browserify using `-t sheetify/transform`: | ||
Compile with browserify using `-t sheetify`: | ||
```sh | ||
$ browserify -t sheetify/transform index.js > bundle.js | ||
$ browserify -t sheetify index.js > bundle.js | ||
``` | ||
@@ -137,3 +137,3 @@ | ||
$ browserify index.js \ | ||
-t [ sheetify/transform ] \ | ||
-t [ sheetify ] \ | ||
-p [ css-extract -o bundle.css ] index.js \ | ||
@@ -169,5 +169,5 @@ -o bundle.js | ||
Compile with browserify using `-t [ sheetify/transform -u sheetify-cssnext ]`: | ||
Compile with browserify using `-t [ sheetify -u sheetify-cssnext ]`: | ||
```sh | ||
$ browserify -t [ sheetify/transform -u sheetify-cssnext ] index.js > bundle.js | ||
$ browserify -t [ sheetify -u sheetify-cssnext ] index.js > bundle.js | ||
``` | ||
@@ -191,3 +191,3 @@ | ||
```sh | ||
$ browserify -t [ sheetify/transform -u sheetify-cssnext ] index.js > bundle.js | ||
$ browserify -t [ sheetify -u sheetify-cssnext ] index.js > bundle.js | ||
``` | ||
@@ -201,3 +201,3 @@ | ||
const b = browserify(path.join(__dirname, 'transform/source.js')) | ||
b.transform('sheetify/transform', { use: [ 'sheetify-cssnext' ] }) | ||
b.transform('sheetify', { use: [ 'sheetify-cssnext' ] }) | ||
b.bundle().pipe(process.stdout) | ||
@@ -204,0 +204,0 @@ ``` |
@@ -8,3 +8,3 @@ const browserify = require('browserify') | ||
const sheetify = require(path.join(__dirname, '../transform')) | ||
const sheetify = require('../') | ||
@@ -11,0 +11,0 @@ test('npm import', function (t) { |
@@ -5,3 +5,3 @@ const test = require('tape') | ||
const transform = require('../transform') | ||
const sheetify = require('..') | ||
@@ -13,3 +13,3 @@ test('JSON files', function (t) { | ||
.add(join(__dirname, 'fixtures', './example.json')) | ||
.transform(transform) | ||
.transform(sheetify) | ||
.bundle(function (err, code) { | ||
@@ -16,0 +16,0 @@ if (err) return t.end(err) |
@@ -8,3 +8,3 @@ const browserify = require('browserify') | ||
const sheetify = require(path.join(__dirname, '../transform')) | ||
const sheetify = require('../') | ||
@@ -11,0 +11,0 @@ test('plugins', function (t) { |
@@ -10,3 +10,2 @@ const browserify = require('browserify') | ||
const transform = require('../transform') | ||
const sheetify = require('..') | ||
@@ -52,3 +51,3 @@ | ||
browserify(bpath, bOpts) | ||
.transform(transform) | ||
.transform(sheetify) | ||
.transform(function (file) { | ||
@@ -93,3 +92,3 @@ return through(function (buf, enc, next) { | ||
browserify(bpath, bOpts) | ||
.transform(transform) | ||
.transform(sheetify) | ||
.transform(function (file) { | ||
@@ -96,0 +95,0 @@ return through(function (buf, enc, next) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
25967
523
8