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

jsass

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsass - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

CHANGELOG.md

24

dist/node.js

@@ -12,24 +12,24 @@ "use strict";

});
Object.defineProperty(exports, "JSFunctionsToNodeSass", {
Object.defineProperty(exports, "JSFunctionsToSass", {
enumerable: true,
get: function get() {
return _JSFunctionsToNodeSass["default"];
return _JSFunctionsToSass["default"];
}
});
Object.defineProperty(exports, "JSVarsToNodeSass", {
Object.defineProperty(exports, "JSVarsToSass", {
enumerable: true,
get: function get() {
return _JSVarsToNodeSass["default"];
return _JSVarsToSass["default"];
}
});
Object.defineProperty(exports, "JSVarsToSassString", {
Object.defineProperty(exports, "JSVarsToSassData", {
enumerable: true,
get: function get() {
return _JSVarsToSassString["default"];
return _JSVarsToSassData["default"];
}
});
Object.defineProperty(exports, "NodeSassVarsToJs", {
Object.defineProperty(exports, "SassVarsToJS", {
enumerable: true,
get: function get() {
return _NodeSassVarsToJs["default"];
return _SassVarsToJS["default"];
}

@@ -46,9 +46,9 @@ });

var _JSFunctionsToNodeSass = _interopRequireDefault(require("./JSFunctionsToNodeSass"));
var _JSFunctionsToSass = _interopRequireDefault(require("./JSFunctionsToSass"));
var _JSVarsToNodeSass = _interopRequireDefault(require("./JSVarsToNodeSass"));
var _JSVarsToSass = _interopRequireDefault(require("./JSVarsToSass"));
var _JSVarsToSassString = _interopRequireDefault(require("./JSVarsToSassString"));
var _JSVarsToSassData = _interopRequireDefault(require("./JSVarsToSassData"));
var _NodeSassVarsToJs = _interopRequireDefault(require("./NodeSassVarsToJs"));
var _SassVarsToJS = _interopRequireDefault(require("./SassVarsToJS"));

@@ -55,0 +55,0 @@ var _jsVarsToDefinePlugin = _interopRequireDefault(require("./jsVarsToDefinePlugin"));

{
"name": "jsass",
"version": "1.0.0",
"version": "1.1.0",
"description": "Pass and convert data between JS and node-sass",

@@ -59,2 +59,3 @@ "homepage": "https://github.com/body-builder/jsass#readme",

"prettier": "^1.18.2",
"sass": "^1.23.1",
"sass-extract": "^2.1.0",

@@ -61,0 +62,0 @@ "sass-extract-loader": "^1.1.0",

@@ -8,3 +8,3 @@ # jSass

Pass and convert data and functions between JavaScript and Sass.
Pass and convert data and functions between JavaScript and Sass. Supports both [Node Sass](https://github.com/sass/node-sass) and [Dart Sass](https://github.com/sass/dart-sass)

@@ -45,11 +45,11 @@ ------

const sass = require('node-sass');
const JSFunctionsToNodeSass = require('../../src/JSFunctionsToNodeSass');
const jsFunctionsToNodeSass = new JSFunctionsToNodeSass();
const { JSFunctionsToSass } = require('jsass/dist/node');
const jsFunctionsToSass = new JSFunctionsToSass();
/**
* This example demonstrates the simplest usage of JSFunctionsToNodeSass, adding a `str-replace` function to Sass
* This example demonstrates the simplest usage of JSFunctionsToSass, adding a `str-replace` function to Sass
*/
sass.render({
file: path.resolve(__dirname, './str-replace.scss'),
functions: jsFunctionsToNodeSass.convert({
functions: jsFunctionsToSass.convert({
'str-replace($string, $search, $replace: "")': function (string, search, replace) {

@@ -93,9 +93,8 @@ if (typeof string !== 'string') {

##### Getting nested map value by key
##### Getting nested map value by key (example with Dart Sass **implementation**)
```js
const path = require('path');
const sass = require('node-sass');
const JSFunctionsToNodeSass = require('../../src/JSFunctionsToNodeSass');
const jsFunctionsToNodeSass = new JSFunctionsToNodeSass();
const { JSFunctionsToSass } = require('jsass/dist/node');
const jsFunctionsToSass = new JSFunctionsToSass();

@@ -108,4 +107,5 @@ const _ = require('lodash');

sass.render({
implementation: require('sass'), // Now we are using `dart-sass`
file: path.resolve(__dirname, './map-get-super.scss'),
functions: jsFunctionsToNodeSass.convert({
functions: jsFunctionsToSass.convert({
'map-get-super($map, $path)': _.get

@@ -149,4 +149,4 @@ })

const sass = require('node-sass');
const JSFunctionsToNodeSass = require('../../src/JSFunctionsToNodeSass');
const jsFunctionsToNodeSass = new JSFunctionsToNodeSass();
const { JSFunctionsToSass } = require('jsass/dist/node');
const jsFunctionsToSass = new JSFunctionsToSass();

@@ -160,3 +160,3 @@ const urljoin = require('url-join');

file: path.resolve(__dirname, './url-join.scss'),
functions: jsFunctionsToNodeSass.convert({
functions: jsFunctionsToSass.convert({
'url-join($paths...)': urljoin

@@ -199,8 +199,8 @@ })

```js
const JSVarsToSassString = require('../../src/JSVarsToSassString');
const jsVarsToSassString = new JSVarsToSassString();
const { JSVarsToSassData } = require('jsass/dist/node');
const jsVarsToSassData = new JSVarsToSassData();
process.env.NODE_ENV = 'development';
const data = jsVarsToSassString.convert({
const data = jsVarsToSassData.convert({
ENV: process.env.NODE_ENV,

@@ -249,4 +249,4 @@ DEV: process.env.NODE_ENV === 'development',

const JSVarsToSassString = require('../../src/JSVarsToSassString');
const jsVarsToSassString = new JSVarsToSassString();
const { JSVarsToSassData } = require('jsass/dist/node');
const jsVarsToSassData = new JSVarsToSassData();

@@ -256,3 +256,3 @@ /**

*/
const data = jsVarsToSassString.convert({
const data = jsVarsToSassData.convert({
ENV: process.env.NODE_ENV,

@@ -259,0 +259,0 @@ DEV: process.env.NODE_ENV === 'development',

@@ -5,6 +5,6 @@ /**

export { default as jSass_extract } from './jSass-extract';
export { default as JSFunctionsToNodeSass } from './JSFunctionsToNodeSass';
export { default as JSVarsToNodeSass } from './JSVarsToNodeSass';
export { default as JSVarsToSassString } from './JSVarsToSassString';
export { default as NodeSassVarsToJs } from './NodeSassVarsToJs';
export { default as JSFunctionsToSass } from './JSFunctionsToSass';
export { default as JSVarsToSass } from './JSVarsToSass';
export { default as JSVarsToSassData } from './JSVarsToSassData';
export { default as SassVarsToJS } from './SassVarsToJS';
export { default as jsVarsToDefinePlugin } from './jsVarsToDefinePlugin';
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