rollup-plugin-css-only
Advanced tools
Comparing version 0.4.0 to 1.0.0
@@ -10,3 +10,3 @@ 'use strict'; | ||
function css (options) { | ||
function css(options) { | ||
if ( options === void 0 ) options = {}; | ||
@@ -21,3 +21,3 @@ | ||
name: 'css', | ||
transform: function transform (code, id) { | ||
transform: function transform(code, id) { | ||
if (!filter(id)) { | ||
@@ -44,3 +44,3 @@ return | ||
}, | ||
ongenerate: function ongenerate (opts) { | ||
generateBundle: function generateBundle(opts) { | ||
// No stylesheet needed | ||
@@ -71,3 +71,9 @@ if (!changes || options.output === false) { | ||
// Guess destination filename | ||
dest = opts.file || (Array.isArray(opts.output) ? opts.output[0].file : opts.output && opts.output.file) || opts.dest || 'bundle.js'; | ||
dest = | ||
opts.file || | ||
(Array.isArray(opts.output) | ||
? opts.output[0].file | ||
: opts.output && opts.output.file) || | ||
opts.dest || | ||
'bundle.js'; | ||
if (dest.endsWith('.js')) { | ||
@@ -80,3 +86,3 @@ dest = dest.slice(0, -3); | ||
// Emit styles to file | ||
return new Promise(function (resolve, reject) { | ||
return new Promise(function(resolve, reject) { | ||
var ref = path.parse(dest); | ||
@@ -83,0 +89,0 @@ var dir = ref.dir; |
@@ -6,3 +6,3 @@ import { writeFile } from 'fs'; | ||
function css (options) { | ||
function css(options) { | ||
if ( options === void 0 ) options = {}; | ||
@@ -17,3 +17,3 @@ | ||
name: 'css', | ||
transform: function transform (code, id) { | ||
transform: function transform(code, id) { | ||
if (!filter(id)) { | ||
@@ -40,3 +40,3 @@ return | ||
}, | ||
ongenerate: function ongenerate (opts) { | ||
generateBundle: function generateBundle(opts) { | ||
// No stylesheet needed | ||
@@ -67,3 +67,9 @@ if (!changes || options.output === false) { | ||
// Guess destination filename | ||
dest = opts.file || (Array.isArray(opts.output) ? opts.output[0].file : opts.output && opts.output.file) || opts.dest || 'bundle.js'; | ||
dest = | ||
opts.file || | ||
(Array.isArray(opts.output) | ||
? opts.output[0].file | ||
: opts.output && opts.output.file) || | ||
opts.dest || | ||
'bundle.js'; | ||
if (dest.endsWith('.js')) { | ||
@@ -76,3 +82,3 @@ dest = dest.slice(0, -3); | ||
// Emit styles to file | ||
return new Promise(function (resolve, reject) { | ||
return new Promise(function(resolve, reject) { | ||
var ref = path.parse(dest); | ||
@@ -79,0 +85,0 @@ var dir = ref.dir; |
{ | ||
"name": "rollup-plugin-css-only", | ||
"version": "0.4.0", | ||
"version": "1.0.0", | ||
"description": "Rollup plugin that bundles imported css", | ||
@@ -9,5 +9,5 @@ "main": "dist/index.cjs.js", | ||
"scripts": { | ||
"build": "rollup -c -f cjs -o dist/index.cjs.js && rollup -c -f es -o dist/index.es.js", | ||
"dev": "rollup -cw -f cjs -o dist/index.cjs.js", | ||
"lint": "standard rollup.config.js src/**", | ||
"build": "rollup -c", | ||
"dev": "rollup -cw", | ||
"lint": "prettier rollup.config.js src/**", | ||
"prepublish": "npm run build" | ||
@@ -17,5 +17,3 @@ }, | ||
"rollup-plugin", | ||
"css", | ||
"modules", | ||
"rollup-plugin-vue2" | ||
"css" | ||
], | ||
@@ -35,11 +33,13 @@ "license": "MIT", | ||
], | ||
"peerDependencies": { | ||
"rollup": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"mkdirp": "^0.5.1", | ||
"rollup-pluginutils": "^1.5.2" | ||
"rollup-pluginutils": "^2.3.3" | ||
}, | ||
"devDependencies": { | ||
"rollup": "^0.36.0", | ||
"rollup-plugin-buble": "^0.14.0", | ||
"rollup-watch": "^2.5.0" | ||
"rollup": "^1.0.0", | ||
"rollup-plugin-buble": "^0.19.6" | ||
} | ||
} |
@@ -56,3 +56,3 @@ # Rollup plugin that bundles imported css | ||
```js | ||
vue({ | ||
css({ | ||
// Filename to write all styles to | ||
@@ -59,0 +59,0 @@ output: 'bundle.scss', |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10728
2
6
176
0
3
+ Added@types/estree@1.0.6(transitive)
+ Added@types/node@22.9.0(transitive)
+ Addedacorn@7.4.1(transitive)
+ Addedestree-walker@0.6.1(transitive)
+ Addedrollup@1.32.1(transitive)
+ Addedrollup-pluginutils@2.8.2(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedestree-walker@0.2.1(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedrollup-pluginutils@1.5.2(transitive)
Updatedrollup-pluginutils@^2.3.3