@csstools/css-tokenizer
Advanced tools
Comparing version 2.1.0 to 2.1.1
# Changes to CSS Tokenizer | ||
### 2.1.1 (April 10, 2023) | ||
- Document `tokenize` helper function | ||
### 2.1.0 (February 21, 2023) | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "@csstools/css-tokenizer", | ||
"description": "Tokenize CSS", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"contributors": [ | ||
@@ -47,12 +47,7 @@ { | ||
"benchmark": "node ./test/benchmark.mjs", | ||
"prebuild": "npm run clean", | ||
"build": "rollup -c ../../rollup/default.mjs", | ||
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"", | ||
"lint": "npm run lint:eslint && npm run lint:package-json", | ||
"lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern", | ||
"lint:package-json": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run clean && npm run build && npm run test", | ||
"lint": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run build && npm run test", | ||
"stryker": "stryker run --logLevel error", | ||
"test": "npm run test:exports && node ./test/test.mjs", | ||
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs" | ||
"test": "node ./test/test.mjs && node ./test/_import.mjs && node ./test/_require.cjs" | ||
}, | ||
@@ -59,0 +54,0 @@ "homepage": "https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer#readme", |
@@ -14,3 +14,3 @@ # CSS Tokenizer | ||
```bash | ||
npm install postcss @csstools/css-tokenizer --save-dev | ||
npm install @csstools/css-tokenizer --save-dev | ||
``` | ||
@@ -42,2 +42,21 @@ | ||
Or use the `tokenize` helper function: | ||
```js | ||
import { tokenize } from '@csstools/css-tokenizer'; | ||
const myCSS = `@media only screen and (min-width: 768rem) { | ||
.foo { | ||
content: 'Some content!' !important; | ||
} | ||
} | ||
`; | ||
const tokens = tokenize({ | ||
css: myCSS, | ||
}); | ||
console.log(tokens); | ||
``` | ||
### Options | ||
@@ -44,0 +63,0 @@ |
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
109
59024
0