Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-css-only

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-css-only - npm Package Compare versions

Comparing version 0.4.0 to 1.0.0

CHANGELOG.md

16

dist/index.cjs.js

@@ -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',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc