postcss-scss
Advanced tools
Comparing version 4.0.8 to 4.0.9
const { Container } = require('postcss') | ||
class NestedDeclaration extends Container { | ||
constructor (defaults) { | ||
constructor(defaults) { | ||
super(defaults) | ||
@@ -6,0 +6,0 @@ this.type = 'decl' |
@@ -5,3 +5,3 @@ let { Input } = require('postcss') | ||
module.exports = function scssParse (scss, opts) { | ||
module.exports = function scssParse(scss, opts) { | ||
let input = new Input(scss, opts) | ||
@@ -8,0 +8,0 @@ |
let Stringifier = require('postcss/lib/stringifier') | ||
class ScssStringifier extends Stringifier { | ||
comment (node) { | ||
comment(node) { | ||
let left = this.raw(node, 'left', 'commentLeft') | ||
@@ -16,3 +16,3 @@ let right = this.raw(node, 'right', 'commentRight') | ||
decl (node, semicolon) { | ||
decl(node, semicolon) { | ||
if (!node.isNested) { | ||
@@ -41,3 +41,3 @@ super.decl(node, semicolon) | ||
rawValue (node, prop) { | ||
rawValue(node, prop) { | ||
let value = node[prop] | ||
@@ -44,0 +44,0 @@ let raw = node.raws[prop] |
let ScssStringifier = require('./scss-stringifier') | ||
module.exports = function scssStringify (node, builder) { | ||
module.exports = function scssStringify(node, builder) { | ||
let str = new ScssStringifier(builder) | ||
str.stringify(node) | ||
} |
@@ -1,4 +0,4 @@ | ||
import * as postcss from 'postcss'; | ||
import * as postcss from 'postcss' | ||
export const parse: postcss.Parser<postcss.Root>; | ||
export const stringify: postcss.Stringifier; | ||
export const parse: postcss.Parser<postcss.Root> | ||
export const stringify: postcss.Stringifier |
@@ -30,3 +30,3 @@ 'use strict' | ||
const RE_WORD_END = /[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g | ||
const RE_BAD_BRACKET = /.[\n"'(/\\]/ | ||
const RE_BAD_BRACKET = /.[\r\n"'(/\\]/ | ||
const RE_HEX_ESCAPE = /[\da-f]/i | ||
@@ -37,3 +37,3 @@ | ||
// SCSS PATCH function name was changed | ||
module.exports = function scssTokenize (input, options = {}) { | ||
module.exports = function scssTokenize(input, options = {}) { | ||
let css = input.css.valueOf() | ||
@@ -52,11 +52,11 @@ let ignore = options.ignoreErrors | ||
function position () { | ||
function position() { | ||
return pos | ||
} | ||
function unclosed (what) { | ||
function unclosed(what) { | ||
throw input.error('Unclosed ' + what, pos) | ||
} | ||
function endOfFile () { | ||
function endOfFile() { | ||
return returned.length === 0 && pos >= length | ||
@@ -66,3 +66,3 @@ } | ||
// SCSS PATCH { | ||
function interpolation () { | ||
function interpolation() { | ||
let deep = 1 | ||
@@ -98,3 +98,3 @@ let stringQuote = false | ||
function nextToken (opts) { | ||
function nextToken(opts) { | ||
if (returned.length) return returned.pop() | ||
@@ -330,3 +330,3 @@ if (pos >= length) return undefined | ||
function back (token) { | ||
function back(token) { | ||
returned.push(token) | ||
@@ -333,0 +333,0 @@ } |
{ | ||
"name": "postcss-scss", | ||
"version": "4.0.8", | ||
"version": "4.0.9", | ||
"description": "SCSS parser for PostCSS", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
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
19425