New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@researchgate/babel-plugin-transform-scss-import-to-string

Package Overview
Dependencies
Maintainers
7
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@researchgate/babel-plugin-transform-scss-import-to-string - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

10

lib/index.js

@@ -1,2 +0,2 @@

const { resolve, dirname } = require('path');
const { resolve, dirname, join } = require('path');
const { readFileSync } = require('fs');

@@ -20,10 +20,14 @@ const { renderSync } = require('node-sass');

// Get full path to file and transpile it
const fullScssFilePath = resolve(
dirname(filename),
const scssFileDirectory = resolve(dirname(filename));
const fullScssFilePath = join(
scssFileDirectory,
path.node.source.value
);
const rawScssContent = readFileSync(fullScssFilePath).toString();
const projectRoot = process.cwd();
const nodeModulesPath = join(projectRoot, 'node_modules');
const sassResult = renderSync({
data: rawScssContent,
sourceMap: false,
includePaths: [nodeModulesPath, scssFileDirectory, projectRoot],
});

@@ -30,0 +34,0 @@ const transpiledContent = sassResult.css.toString() || '';

{
"name": "@researchgate/babel-plugin-transform-scss-import-to-string",
"version": "0.1.0",
"description":
"Babel plugin for transforming SCSS imports to static variable declarations with transpiled CSS string",
"version": "0.1.1",
"description": "Babel plugin for transforming SCSS imports to static variable declarations with transpiled CSS string",
"main": "lib/index.js",
"files": ["lib/", "readme.md"],
"files": [
"lib/",
"readme.md"
],
"scripts": {

@@ -12,11 +14,15 @@ "test": "jest"

"repository": "researchgate/babel-plugin-transform-scss-import-to-string",
"keywords": ["babel", "scss", "css", "inline", "transform"],
"keywords": [
"babel",
"scss",
"css",
"inline",
"transform"
],
"author": "Sergey Bekrin <sergey@bekrin.me>",
"license": "MIT",
"bugs": {
"url":
"https://github.com/researchgate/babel-plugin-transform-scss-import-to-string/issues"
"url": "https://github.com/researchgate/babel-plugin-transform-scss-import-to-string/issues"
},
"homepage":
"https://github.com/researchgate/babel-plugin-transform-scss-import-to-string#readme",
"homepage": "https://github.com/researchgate/babel-plugin-transform-scss-import-to-string#readme",
"devDependencies": {

@@ -23,0 +29,0 @@ "babel-core": "^6.26.0",

@@ -15,3 +15,3 @@ # `babel-plugin-transform-scss-import-to-string`

```
npm install --save-dev babel-plugin-styled-components
npm install --save-dev @researchgate/babel-plugin-transform-scss-import-to-string
```

@@ -18,0 +18,0 @@

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