scss-tokenizer

A tokenzier for Sass' SCSS syntax

MIT 13 个版本
安装
npm install scss-tokenizer
yarn add scss-tokenizer
pnpm add scss-tokenizer
bun add scss-tokenizer
README

scss-tokenizer

A tokenizer for Sass' SCSS syntax

Install

npm install scss-tokenizer

Usage

var scss = require('scss-tokenizer');
scss.tokenize(css);

API

tokenize

Tokenizes source css and returns an ordered array of tokens with positional data.

var tokenizer = require('scss-tokenizer');
var tokens = tokenize.tokenize(css);

Arguments:

  • css (string|#toString): String with input CSS or any object with toString() method, like file stream.
  • opts (object) optional: options:
    • from: the path to the source CSS file. You should always set from, because it is used in map generation and in syntax error messages.

Test

npm test

Attribution

This project started as a fork of the PostCSS tokenizer.

版本列表
0.4.3 2022-08-10
0.4.2 2018-12-03
0.4.1 2018-12-03
0.4.0 2018-12-03
0.3.0 2018-04-16
0.2.3 2017-05-12
0.2.2 2017-05-12
0.2.1 2017-04-29
0.2.0 2017-04-29
0.1.2 2017-01-29
0.1.1 2017-01-29
0.1.0 2017-01-29
0.0.1 2015-06-09