rollup-plugin-css-only
Advanced tools
Comparing version 0.2.0 to 0.3.0
'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var fs = require('fs'); | ||
var rollupPluginutils = require('rollup-pluginutils'); | ||
var path = _interopDefault(require('path')); | ||
var mkdirp = _interopDefault(require('mkdirp')); | ||
@@ -73,7 +77,16 @@ function css (options) { | ||
return new Promise(function (resolve, reject) { | ||
fs.writeFile(dest, css, function (err) { | ||
var ref = path.parse(dest); | ||
var dir = ref.dir; | ||
mkdirp(dir, function (err) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(); | ||
fs.writeFile(dest, css, function (err) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(); | ||
} | ||
}); | ||
} | ||
@@ -80,0 +93,0 @@ }); |
import { writeFile } from 'fs'; | ||
import { createFilter } from 'rollup-pluginutils'; | ||
import path from 'path'; | ||
import mkdirp from 'mkdirp'; | ||
@@ -71,7 +73,16 @@ function css (options) { | ||
return new Promise(function (resolve, reject) { | ||
writeFile(dest, css, function (err) { | ||
var ref = path.parse(dest); | ||
var dir = ref.dir; | ||
mkdirp(dir, function (err) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(); | ||
writeFile(dest, css, function (err) { | ||
if (err) { | ||
reject(err); | ||
} else { | ||
resolve(); | ||
} | ||
}); | ||
} | ||
@@ -78,0 +89,0 @@ }); |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "rollup-plugin-css-only", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Rollup plugin that bundles imported css", | ||
@@ -34,2 +34,3 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"mkdirp": "^0.5.1", | ||
"rollup-pluginutils": "^1.5.2" | ||
@@ -36,0 +37,0 @@ }, |
@@ -0,0 +0,0 @@ # Rollup plugin that bundles imported css |
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
9700
164
2
+ Addedmkdirp@^0.5.1
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)