mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
chore:更换到主分支
This commit is contained in:
140
node_modules/postcss/CHANGELOG.md
generated
vendored
140
node_modules/postcss/CHANGELOG.md
generated
vendored
@@ -1,5 +1,143 @@
|
||||
# Change Log
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
This project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## 8.2.6
|
||||
* Fixed `Maximum call stack size exceeded` in `Node#toJSON`.
|
||||
* Fixed docs (by inokawa).
|
||||
|
||||
## 8.2.5
|
||||
* Fixed escaped characters handling in `list.split` (by Natalie Weizenbaum).
|
||||
|
||||
## 8.2.4
|
||||
* Added plugin name to `postcss.plugin()` warning (by Tom Williams).
|
||||
* Fixed docs (by Bill Columbia).
|
||||
|
||||
## 8.2.3
|
||||
* Fixed `JSON.stringify(Node[])` support (by Niklas Mischkulnig).
|
||||
|
||||
## 8.2.2
|
||||
* Fixed CSS-in-JS support (by James Garbutt).
|
||||
* Fixed plugin types (by Ludovico Fischer).
|
||||
* Fixed `Result#warn()` types.
|
||||
|
||||
## 8.2.1
|
||||
* Fixed `Node#toJSON()` and `postcss.fromJSON()` (by Niklas Mischkulnig).
|
||||
|
||||
## 8.2 “Prince Orobas”
|
||||
* Added `Node#toJSON()` and `postcss.fromJSON()` (by Niklas Mischkulnig).
|
||||
|
||||
## 8.1.14
|
||||
* Fixed parser performance regression.
|
||||
|
||||
## 8.1.13
|
||||
* Fixed broken AST after moving nodes in visitor API.
|
||||
|
||||
## 8.1.12
|
||||
* Fixed Autoprefixer regression.
|
||||
|
||||
## 8.1.11
|
||||
* Added PostCSS update suggestion on unknown event in plugin.
|
||||
|
||||
## 8.1.10
|
||||
* Fixed `LazyResult` type export (by Evan You).
|
||||
* Fixed `LazyResult` type compatibility with `Promise` (by Anton Kastritskiy).
|
||||
|
||||
## 8.1.9
|
||||
* Reduced dependencies number (by Bogdan Chadkin).
|
||||
|
||||
## 8.1.8
|
||||
* Fixed `LazyResult` type compatibility with `Promise` (by Ludovico Fischer).
|
||||
* Fixed HTTPS links in documentation.
|
||||
|
||||
## 8.1.7
|
||||
* Fixed `import` support in TypeScript (by Remco Haszing).
|
||||
|
||||
## 8.1.6
|
||||
* Reverted `package.exports` Node.js 15 fix.
|
||||
|
||||
## 8.1.5
|
||||
* Fixed Node.js 15 warning (by 沈鸿飞).
|
||||
|
||||
## 8.1.4
|
||||
* Fixed TypeScript definition (by Arthur Petrie).
|
||||
|
||||
## 8.1.3
|
||||
* Added `package.types`.
|
||||
|
||||
## 8.1.2
|
||||
* Fixed API docs (by Arthur Petrie).
|
||||
* Improved plugin guide (by Yunus Gaziev).
|
||||
* Prepared code base for Deno support (by Oscar Otero).
|
||||
|
||||
## 8.1.1
|
||||
* Updated funding link.
|
||||
|
||||
## 8.1 “Duke Gemory”
|
||||
* Added `Once` and `OnceExit` events.
|
||||
* Fixed `Root` and `RootExit` events re-visiting.
|
||||
* Fixed node re-visiting on deep children changes.
|
||||
* Added docs for visitor API events.
|
||||
|
||||
## 8.0.9
|
||||
* Replace prototype in PostCSS 7 nodes instead of recreating them.
|
||||
* Added missed `Transformer` to exported types (by Pierre-Marie Dartus).
|
||||
|
||||
## 8.0.8
|
||||
* Fix `8.0.7` regression on PostCSS 7 nodes converting (by Adam Wathan).
|
||||
|
||||
## 8.0.7
|
||||
* Fixed compatibility issue with mixin AST with PostCSS 7 and 8 nodes.
|
||||
* Added migration guide translation to Chinese to the warning.
|
||||
|
||||
## 8.0.6
|
||||
* Fixed child adding methods in `Container`.
|
||||
|
||||
## 8.0.5
|
||||
* Update changelog.
|
||||
|
||||
## 8.0.4
|
||||
* Fixed `Cannot read property 'line' of null` error.
|
||||
* Fixed source map support for declarations.
|
||||
|
||||
## 8.0.3
|
||||
* Fixed client-side bundling support.
|
||||
|
||||
## 8.0.2
|
||||
* Fixed plugin packs support.
|
||||
|
||||
## 8.0.1
|
||||
* Updated `Processor#version`.
|
||||
|
||||
## 8.0 “President Ose”
|
||||
* Removed support for Node.js 6.x, 8.x, 11.x, and 13.x versions.
|
||||
* Removed `postcss.vendor` helpers.
|
||||
* Deprecated `postcss.plugin()` API.
|
||||
* Treats `sourceMap.sources` as URL instead of file path.
|
||||
* Plugins and runners must have `postcss` in `peerDependencies`.
|
||||
* Prohibited to extend PostCSS AST classes.
|
||||
* Moved from JSDoc to TypeDoc.
|
||||
* Moved unknown source from counter to random IDs.
|
||||
* Added visitor API for plugins (by Alexey Bondarenko).
|
||||
* Added ES modules support.
|
||||
* Added named exports for public classes `const { Rule } = require('postcss)`.
|
||||
* Added `position.url` to `Node#origin()` result.
|
||||
* Added `opts.maps.absolute = true` option.
|
||||
* Added `opts.maps.annotation = (file, root) => url` option support.
|
||||
* Added `Node#source.offset` (by Ayaz Zaynutdinov).
|
||||
* Added `Declaration#variable`.
|
||||
* Added JSON source map support.
|
||||
* Added index source map support.
|
||||
* Added `Declaration#value` auto-converting to string.
|
||||
* Fixed parsing `{}` in at-rule parameters.
|
||||
* Fixed parsing empty Custom Properties. `--foo: ;` will have ` ` value.
|
||||
* Fixed building PostCSS with Rollup (by MapGrid).
|
||||
* Fixed TypeScript types.
|
||||
* Fixed source map relative paths.
|
||||
* Fixed calling `replaceWith` with input replaced node (by Joseph Kaptur).
|
||||
* Improved “Writing a PostCSS Plugin” docs (by Alexey Bondarenko).
|
||||
* Removed Babel from the project’s release process.
|
||||
* Removed docs from npm package.
|
||||
* Replaced `chalk` to `colorette`.
|
||||
|
||||
## 7.0.35
|
||||
* Add migration guide link to PostCSS 8 error text.
|
||||
|
||||
87
node_modules/postcss/README.md
generated
vendored
87
node_modules/postcss/README.md
generated
vendored
@@ -2,7 +2,7 @@
|
||||
|
||||
<img align="right" width="95" height="95"
|
||||
alt="Philosopher’s stone, logo of PostCSS"
|
||||
src="http://postcss.github.io/postcss/logo.svg">
|
||||
src="https://postcss.org/logo.svg">
|
||||
|
||||
[chat-img]: https://img.shields.io/badge/Gitter-Join_the_PostCSS_chat-brightgreen.svg
|
||||
[chat]: https://gitter.im/postcss/postcss
|
||||
@@ -18,16 +18,16 @@ CSS processors.
|
||||
PostCSS takes a CSS file and provides an API to analyze and modify its rules
|
||||
(by transforming them into an [Abstract Syntax Tree]).
|
||||
This API can then be used by [plugins] to do a lot of useful things,
|
||||
e.g. to find errors automatically insert vendor prefixes.
|
||||
e.g., to find errors automatically, or to insert vendor prefixes.
|
||||
|
||||
**Support / Discussion:** [Gitter](https://gitter.im/postcss/postcss)<br>
|
||||
**Twitter account:** [@postcss](https://twitter.com/postcss)<br>
|
||||
**VK.com page:** [postcss](https://vk.com/postcss)<br>
|
||||
**中文翻译**: [`README-cn.md`](./README-cn.md)
|
||||
**中文翻译**: [`docs/README-cn.md`](./docs/README-cn.md)
|
||||
|
||||
For PostCSS commercial support (consulting, improving the front-end culture
|
||||
of your company, PostCSS plugins), contact [Evil Martians]
|
||||
at <surrender@evilmartians.com>.
|
||||
at <postcss@evilmartians.com>.
|
||||
|
||||
[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree
|
||||
[Evil Martians]: https://evilmartians.com/?utm_source=postcss
|
||||
@@ -39,6 +39,7 @@ at <surrender@evilmartians.com>.
|
||||
alt="Sponsored by Evil Martians" width="236" height="54">
|
||||
</a>
|
||||
|
||||
|
||||
## Sponsorship
|
||||
|
||||
PostCSS needs your support. We are accepting donations
|
||||
@@ -49,6 +50,7 @@ PostCSS needs your support. We are accepting donations
|
||||
alt="Sponsored by Tailwind CSS" width="273" height="64">
|
||||
</a>
|
||||
|
||||
|
||||
## Plugins
|
||||
|
||||
Currently, PostCSS has more than 200 plugins. You can find all of the plugins
|
||||
@@ -58,8 +60,9 @@ on top of PostCSS.
|
||||
|
||||
If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
|
||||
[searchable catalog]: http://postcss.parts
|
||||
[plugins list]: https://github.com/postcss/postcss/blob/master/docs/plugins.md
|
||||
[searchable catalog]: https://www.postcss.parts/
|
||||
[plugins list]: https://github.com/postcss/postcss/blob/main/docs/plugins.md
|
||||
|
||||
|
||||
### Solve Global CSS Problem
|
||||
|
||||
@@ -74,11 +77,13 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
* [`cq-prolyfill`] adds container query support, allowing styles that respond
|
||||
to the width of the parent.
|
||||
|
||||
|
||||
### Use Future CSS, Today
|
||||
|
||||
* [`autoprefixer`] adds vendor prefixes, using data from Can I Use.
|
||||
* [`postcss-preset-env`] allows you to use future CSS features today.
|
||||
|
||||
|
||||
### Better CSS Readability
|
||||
|
||||
* [`precss`] contains plugins for Sass-like features, like variables, nesting,
|
||||
@@ -87,6 +92,7 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
* [`postcss-utilities`] includes the most commonly used shortcuts and helpers.
|
||||
* [`short`] adds and extends numerous shorthand properties.
|
||||
|
||||
|
||||
### Images and Fonts
|
||||
|
||||
* [`postcss-assets`] inserts image dimensions and inlines files.
|
||||
@@ -94,6 +100,8 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
* [`font-magician`] generates all the `@font-face` rules needed in CSS.
|
||||
* [`postcss-inline-svg`] allows you to inline SVG and customize its styles.
|
||||
* [`postcss-write-svg`] allows you to write simple SVG directly in your CSS.
|
||||
* [`webp-in-css`] to use WebP image format in CSS background.
|
||||
* [`avif-in-css`] to use AVIF image format in CSS background.
|
||||
|
||||
### Linters
|
||||
|
||||
@@ -103,6 +111,7 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
* [`doiuse`] lints CSS for browser support, using data from Can I Use.
|
||||
* [`colorguard`] helps you maintain a consistent color palette.
|
||||
|
||||
|
||||
### Other
|
||||
|
||||
* [`postcss-rtl`] combines both-directional (left-to-right and right-to-left) styles in one CSS file.
|
||||
@@ -110,7 +119,7 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
* [`lost`] is a feature-rich `calc()` grid system.
|
||||
* [`rtlcss`] mirrors styles for right-to-left locales.
|
||||
|
||||
[PostCSS plugin development]: https://github.com/postcss/postcss/blob/master/docs/writing-a-plugin.md
|
||||
[PostCSS plugin development]: https://github.com/postcss/postcss/blob/main/docs/writing-a-plugin.md
|
||||
[`postcss-inline-svg`]: https://github.com/TrySound/postcss-inline-svg
|
||||
[`postcss-preset-env`]: https://github.com/jonathantneal/postcss-preset-env
|
||||
[`react-css-modules`]: https://github.com/gajus/react-css-modules
|
||||
@@ -128,10 +137,12 @@ If you have any new ideas, [PostCSS plugin development] is really easy.
|
||||
[`postcss-rtl`]: https://github.com/vkalinichev/postcss-rtl
|
||||
[`postcss-use`]: https://github.com/postcss/postcss-use
|
||||
[`css-modules`]: https://github.com/css-modules/css-modules
|
||||
[`webp-in-css`]: https://github.com/ai/webp-in-css
|
||||
[`avif-in-css`]: https://github.com/nucliweb/avif-in-css
|
||||
[`colorguard`]: https://github.com/SlexAxton/css-colorguard
|
||||
[`stylelint`]: https://github.com/stylelint/stylelint
|
||||
[`stylefmt`]: https://github.com/morishitter/stylefmt
|
||||
[`cssnano`]: http://cssnano.co
|
||||
[`cssnano`]: https://cssnano.co/
|
||||
[`precss`]: https://github.com/jonathantneal/precss
|
||||
[`doiuse`]: https://github.com/anandthakker/doiuse
|
||||
[`rtlcss`]: https://github.com/MohammadYounes/rtlcss
|
||||
@@ -177,18 +188,21 @@ you can write a parser and/or stringifier to extend PostCSS.
|
||||
[`sugarss`]: https://github.com/postcss/sugarss
|
||||
[`midas`]: https://github.com/ben-eb/midas
|
||||
|
||||
|
||||
## Articles
|
||||
|
||||
* [Some things you may think about PostCSS… and you might be wrong](http://julian.io/some-things-you-may-think-about-postcss-and-you-might-be-wrong)
|
||||
* [What PostCSS Really Is; What It Really Does](http://davidtheclark.com/its-time-for-everyone-to-learn-about-postcss)
|
||||
* [PostCSS Guides](http://webdesign.tutsplus.com/series/postcss-deep-dive--cms-889)
|
||||
* [What PostCSS Really Is; What It Really Does](https://davidtheclark.com/its-time-for-everyone-to-learn-about-postcss/)
|
||||
* [PostCSS Guides](https://webdesign.tutsplus.com/series/postcss-deep-dive--cms-889)
|
||||
|
||||
More articles and videos you can find on [awesome-postcss](https://github.com/jjaderg/awesome-postcss) list.
|
||||
|
||||
|
||||
## Books
|
||||
|
||||
* [Mastering PostCSS for Web Design](https://www.packtpub.com/web-development/mastering-postcss-web-design) by Alex Libby, Packt. (June 2016)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
You can start using PostCSS in just two steps:
|
||||
@@ -196,7 +210,8 @@ You can start using PostCSS in just two steps:
|
||||
1. Find and add PostCSS extensions for your build tool.
|
||||
2. [Select plugins] and add them to your PostCSS process.
|
||||
|
||||
[Select plugins]: http://postcss.parts
|
||||
[Select plugins]: https://www.postcss.parts/
|
||||
|
||||
|
||||
### CSS-in-JS
|
||||
|
||||
@@ -233,6 +248,7 @@ module.exports = {
|
||||
|
||||
[`astroturf`]: https://github.com/4Catalyzer/astroturf
|
||||
|
||||
|
||||
### Parcel
|
||||
|
||||
[Parcel] has built-in PostCSS support. It already uses Autoprefixer
|
||||
@@ -254,6 +270,7 @@ Parcel will even automatically install these plugins for you.
|
||||
|
||||
[Parcel]: https://parceljs.org
|
||||
|
||||
|
||||
### Webpack
|
||||
|
||||
Use [`postcss-loader`] in `webpack.config.js`:
|
||||
@@ -298,6 +315,7 @@ module.exports = {
|
||||
|
||||
[`postcss-loader`]: https://github.com/postcss/postcss-loader
|
||||
|
||||
|
||||
### Gulp
|
||||
|
||||
Use [`gulp-postcss`] and [`gulp-sourcemaps`].
|
||||
@@ -318,17 +336,19 @@ gulp.task('css', () => {
|
||||
[`gulp-sourcemaps`]: https://github.com/floridoo/gulp-sourcemaps
|
||||
[`gulp-postcss`]: https://github.com/postcss/gulp-postcss
|
||||
|
||||
### npm run / CLI
|
||||
|
||||
### npm Scripts
|
||||
|
||||
To use PostCSS from your command-line interface or with npm scripts
|
||||
there is [`postcss-cli`].
|
||||
|
||||
```sh
|
||||
postcss --use autoprefixer -c options.json -o main.css css/*.css
|
||||
postcss --use autoprefixer -o main.css css/*.css
|
||||
```
|
||||
|
||||
[`postcss-cli`]: https://github.com/postcss/postcss-cli
|
||||
|
||||
|
||||
### Browser
|
||||
|
||||
If you want to compile CSS string in browser (for instance, in live edit
|
||||
@@ -339,8 +359,8 @@ To apply PostCSS plugins to React Inline Styles, JSS, Radium
|
||||
and other [CSS-in-JS], you can use [`postcss-js`] and transforms style objects.
|
||||
|
||||
```js
|
||||
var postcss = require('postcss-js')
|
||||
var prefixer = postcss.sync([ require('autoprefixer') ])
|
||||
const postcss = require('postcss-js')
|
||||
const prefixer = postcss.sync([ require('autoprefixer') ])
|
||||
|
||||
prefixer({ display: 'flex' }) //=> { display: ['-webkit-box', '-webkit-flex', '-ms-flexbox', 'flex'] }
|
||||
```
|
||||
@@ -350,9 +370,24 @@ prefixer({ display: 'flex' }) //=> { display: ['-webkit-box', '-webkit-flex', '-
|
||||
[CSS-in-JS]: https://github.com/MicheleBertoli/css-in-js
|
||||
[webpack]: https://webpack.github.io/
|
||||
|
||||
|
||||
### Deno
|
||||
|
||||
PostCSS also supports [Deno]:
|
||||
|
||||
```js
|
||||
import postcss from 'https://deno.land/x/postcss/mod.js'
|
||||
import autoprefixer from 'https://dev.jspm.io/autoprefixer'
|
||||
|
||||
const result = await postcss([autoprefixer]).process(css)
|
||||
```
|
||||
|
||||
[Deno]: https://deno.land/
|
||||
|
||||
|
||||
### Runners
|
||||
|
||||
* **Grunt**: [`grunt-postcss`](https://github.com/nDmitry/grunt-postcss)
|
||||
* **Grunt**: [`@lodder/grunt-postcss`](https://github.com/C-Lodder/grunt-postcss)
|
||||
* **HTML**: [`posthtml-postcss`](https://github.com/posthtml/posthtml-postcss)
|
||||
* **Stylus**: [`poststylus`](https://github.com/seaneking/poststylus)
|
||||
* **Rollup**: [`rollup-plugin-postcss`](https://github.com/egoist/rollup-plugin-postcss)
|
||||
@@ -364,6 +399,7 @@ prefixer({ display: 'flex' }) //=> { display: ['-webkit-box', '-webkit-flex', '-
|
||||
* **Start**: [`start-postcss`](https://github.com/start-runner/postcss)
|
||||
* **Connect/Express**: [`postcss-middleware`](https://github.com/jedmao/postcss-middleware)
|
||||
|
||||
|
||||
### JS API
|
||||
|
||||
For other environments, you can use the JS API:
|
||||
@@ -380,7 +416,7 @@ fs.readFile('src/app.css', (err, css) => {
|
||||
.then(result => {
|
||||
fs.writeFile('dest/app.css', result.css, () => true)
|
||||
if ( result.map ) {
|
||||
fs.writeFile('dest/app.css.map', result.map, () => true)
|
||||
fs.writeFile('dest/app.css.map', result.map.toString(), () => true)
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -390,8 +426,9 @@ Read the [PostCSS API documentation] for more details about the JS API.
|
||||
|
||||
All PostCSS runners should pass [PostCSS Runner Guidelines].
|
||||
|
||||
[PostCSS Runner Guidelines]: https://github.com/postcss/postcss/blob/master/docs/guidelines/runner.md
|
||||
[PostCSS API documentation]: http://api.postcss.org/postcss.html
|
||||
[PostCSS Runner Guidelines]: https://github.com/postcss/postcss/blob/main/docs/guidelines/runner.md
|
||||
[PostCSS API documentation]: https://postcss.org/api/
|
||||
|
||||
|
||||
### Options
|
||||
|
||||
@@ -409,10 +446,11 @@ Common options:
|
||||
* `from`: the input file name (most runners set it automatically).
|
||||
* `to`: the output file name (most runners set it automatically).
|
||||
|
||||
[source map options]: https://github.com/postcss/postcss/blob/master/docs/source-maps.md
|
||||
[source map options]: https://postcss.org/api/#sourcemapoptions
|
||||
[Midas]: https://github.com/ben-eb/midas
|
||||
[SCSS]: https://github.com/postcss/postcss-scss
|
||||
|
||||
|
||||
### Treat Warnings as Errors
|
||||
|
||||
In some situations it might be helpful to fail the build on any warning
|
||||
@@ -430,13 +468,10 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
[Our contributing guidelines](./CONTRIBUTING.md) will help you
|
||||
with making pull request to this project.
|
||||
|
||||
## Editors & IDE Integration
|
||||
|
||||
|
||||
### VS Code
|
||||
|
||||
* [`csstools.postcss`] adds support for PostCSS, `postcss-preset-env`
|
||||
@@ -444,6 +479,7 @@ with making pull request to this project.
|
||||
|
||||
[`csstools.postcss`]: https://marketplace.visualstudio.com/items?itemName=csstools.postcss
|
||||
|
||||
|
||||
### Atom
|
||||
|
||||
* [`language-postcss`] adds PostCSS and [SugarSS] highlight.
|
||||
@@ -451,6 +487,7 @@ with making pull request to this project.
|
||||
|
||||
[SugarSS]: https://github.com/postcss/sugarss
|
||||
|
||||
|
||||
### Sublime Text
|
||||
|
||||
* [`Syntax-highlighting-for-PostCSS`] adds PostCSS highlight.
|
||||
@@ -459,12 +496,14 @@ with making pull request to this project.
|
||||
[`source-preview-postcss`]: https://atom.io/packages/source-preview-postcss
|
||||
[`language-postcss`]: https://atom.io/packages/language-postcss
|
||||
|
||||
|
||||
### Vim
|
||||
|
||||
* [`postcss.vim`] adds PostCSS highlight.
|
||||
|
||||
[`postcss.vim`]: https://github.com/stephenway/postcss.vim
|
||||
|
||||
|
||||
### WebStorm
|
||||
|
||||
WebStorm 2016.3 [has] built-in PostCSS support.
|
||||
|
||||
156
node_modules/postcss/docs/architecture.md
generated
vendored
156
node_modules/postcss/docs/architecture.md
generated
vendored
@@ -1,156 +0,0 @@
|
||||
## PostCSS Architecture
|
||||
|
||||
General overview of the PostCSS architecture.
|
||||
It can be useful for everyone who wishes to contribute to the core or develop a better understanding of the tool.
|
||||
|
||||
**Table of Contents**
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Workflow](#workflow)
|
||||
- [Core Structures](#core-structures)
|
||||
* [Tokenizer](#tokenizer--libtokenizees6-)
|
||||
* [Parser](#parser--libparsees6-libparseres6-)
|
||||
* [Processor](#processor--libprocessores6-)
|
||||
* [Stringifier](#stringifier--libstringifyes6-libstringifieres6-)
|
||||
- [API](#api-reference)
|
||||
|
||||
### Overview
|
||||
|
||||
> This section describes ideas lying behind PostCSS
|
||||
|
||||
Before diving deeper into the development of PostCSS let's briefly describe what is PostCSS and what is not.
|
||||
|
||||
**PostCSS**
|
||||
|
||||
- *is **NOT** a style preprocessor like `Sass` or `Less`.*
|
||||
|
||||
It does not define a custom syntax and semantics, it's not actually a language.
|
||||
PostCSS works with CSS and can be easily integrated with the tools described above. That being said any valid CSS can be processed by PostCSS.
|
||||
|
||||
- *is a tool for CSS syntax transformations*
|
||||
|
||||
It allows you to define custom CSS like syntax that could be understandable and transformed by plugins. That being said PostCSS is not strictly about CSS spec but about syntax definition manner of CSS. In such a way you can define custom syntax constructs like at-rule, that could be very helpful for tools build around PostCSS. PostCSS plays the role of a framework for building outstanding tools for CSS manipulations.
|
||||
|
||||
- *is a big player in CSS ecosystem*
|
||||
|
||||
A Large amount of lovely tools like `Autoprefixer`, `Stylelint`, `CSSnano` were built on PostCSS ecosystem. There is a big chance that you already use it implicitly, just check your `node_modules` :smiley:
|
||||
|
||||
### Workflow
|
||||
|
||||
This is a high-level overview of the whole PostCSS workflow
|
||||
|
||||
<img width="300" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/PostCSS_scheme.svg/512px-PostCSS_scheme.svg.png" alt="workflow">
|
||||
|
||||
As you can see from the diagram above, PostCSS architecture is pretty straightforward but some parts of it could be misunderstood.
|
||||
|
||||
You can see a part called *Parser*, this construct will be described in details later on, just for now think about it as a structure that can understand your CSS like syntax and create an object representation of it.
|
||||
|
||||
That being said, there are few ways to write a parser.
|
||||
|
||||
- *Write a single file with string to AST transformation*
|
||||
|
||||
This method is quite popular, for example, the [Rework analyzer](https://github.com/reworkcss/css/blob/master/lib/parse/index.js) was written in this style. But with a large code base, the code becomes hard to read and pretty slow.
|
||||
|
||||
- *Split it into lexical analysis/parsing steps (source string → tokens → AST)*
|
||||
|
||||
This is the way of how we do it in PostCSS and also the most popular one.
|
||||
A lot of parsers like [`@babel/parser` (parser behind Babel)](https://github.com/babel/babel/tree/master/packages/babel-parser), [`CSSTree`](https://github.com/csstree/csstree) were written in such way.
|
||||
The main reasons to separate tokenization from parsing steps are performance and abstracting complexity.
|
||||
|
||||
Let think about why the second way is better for our needs.
|
||||
|
||||
First of all, because string to tokens step takes more time than parsing step. We operate on large source string and process it char by char, this is why it is very inefficient operation in terms of performance and we should perform it only once.
|
||||
|
||||
But from other side tokens to AST transformation is logically more complex so with such separation we could write very fast tokenizer (but from this comes sometimes hard to read code) and easy to read (but slow) parser.
|
||||
|
||||
Summing it up splitting into two steps improve performance and code readability.
|
||||
|
||||
So now let's look more closely on structures that play the main role in PostCSS workflow.
|
||||
|
||||
### Core Structures
|
||||
|
||||
- #### Tokenizer ( [lib/tokenize.es6](https://github.com/postcss/postcss/blob/master/lib/tokenize.es6) )
|
||||
|
||||
Tokenizer (aka Lexer) plays important role in syntax analysis.
|
||||
|
||||
It accepts CSS string and returns a list of tokens.
|
||||
|
||||
Token is a simple structure that describes some part of syntax like `at-rule`, `comment` or `word`. It can also contain positional information for more descriptive errors.
|
||||
|
||||
For example, if we consider following CSS
|
||||
|
||||
```css
|
||||
.className { color: #FFF; }
|
||||
```
|
||||
|
||||
corresponding tokens from PostCSS will be
|
||||
```js
|
||||
[
|
||||
["word", ".className", 1, 1, 1, 10]
|
||||
["space", " "]
|
||||
["{", "{", 1, 12]
|
||||
["space", " "]
|
||||
["word", "color", 1, 14, 1, 18]
|
||||
[":", ":", 1, 19]
|
||||
["space", " "]
|
||||
["word", "#FFF" , 1, 21, 1, 23]
|
||||
[";", ";", 1, 24]
|
||||
["space", " "]
|
||||
["}", "}", 1, 26]
|
||||
]
|
||||
```
|
||||
|
||||
As you can see from the example above a single token represented as a list and also `space` token doesn't have positional information.
|
||||
|
||||
Let's look more closely on single token like `word`. As it was said each token represented as a list and follow such pattern.
|
||||
|
||||
```js
|
||||
const token = [
|
||||
// represents token type
|
||||
'word',
|
||||
|
||||
// represents matched word
|
||||
'.className',
|
||||
|
||||
// This two numbers represent start position of token.
|
||||
// It is optional value as we saw in the example above,
|
||||
// tokens like `space` don't have such information.
|
||||
|
||||
// Here the first number is line number and the second one is corresponding column.
|
||||
1, 1,
|
||||
|
||||
// Next two numbers also optional and represent end position for multichar tokens like this one. Numbers follow same rule as was described above
|
||||
1, 10
|
||||
]
|
||||
```
|
||||
There are many patterns how tokenization could be done, PostCSS motto is performance and simplicity. Tokenization is a complex computing operation and takes a large amount of syntax analysis time ( ~90% ), that why PostCSS' Tokenizer looks dirty but it was optimized for speed. Any high-level constructs like classes could dramatically slow down tokenizer.
|
||||
|
||||
PostCSS' Tokenizer uses some sort of streaming/chaining API where you expose [`nextToken()`](https://github.com/postcss/postcss/blob/master/lib/tokenize.es6#L48-L308) method to Parser. In this manner, we provide a clean interface for Parser and reduce memory usage by storing only a few tokens and not the whole list of tokens.
|
||||
|
||||
- #### Parser ( [lib/parse.es6](https://github.com/postcss/postcss/blob/master/lib/parse.es6), [lib/parser.es6](https://github.com/postcss/postcss/blob/master/lib/parser.es6) )
|
||||
|
||||
Parser is the main structure responsible for [syntax analysis](https://en.wikipedia.org/wiki/Parsing) of incoming CSS. Parser produces a structure called [Abstract Syntax Tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) that could then be transformed by plugins later on.
|
||||
|
||||
Parser works in common with Tokenizer and operates over tokens, not source string, as it would be a very inefficient operation.
|
||||
|
||||
It uses mostly `nextToken` and `back` methods provided by Tokenizer for obtaining single or multiple tokens and then construct part of AST called `Node`.
|
||||
|
||||
There are multiple Node types that PostCSS could produce but all of them inherit from base Node [class](https://github.com/postcss/postcss/blob/master/lib/node.es6#L34).
|
||||
|
||||
- #### Processor ( [lib/processor.es6](https://github.com/postcss/postcss/blob/master/lib/processor.es6) )
|
||||
|
||||
Processor is a very plain structure that initializes plugins and runs syntax transformations. Plugin is just a function registered with [postcss.plugin](https://github.com/postcss/postcss/blob/master/lib/postcss.es6#L109) call.
|
||||
|
||||
It exposes only a few public API methods. Description of them could be found on [api.postcss.org/Processor](http://api.postcss.org/Processor.html)
|
||||
|
||||
- #### Stringifier ( [lib/stringify.es6](https://github.com/postcss/postcss/blob/master/lib/stringify.es6), [lib/stringifier.es6](https://github.com/postcss/postcss/blob/master/lib/stringifier.es6) )
|
||||
|
||||
Stringifier is a base class that translates modified AST to pure CSS string. Stringifier traverses AST starting from provided Node and generates a raw string representation of it calling corresponding methods.
|
||||
|
||||
The most essential method is [`Stringifier.stringify`](https://github.com/postcss/postcss/blob/master/lib/stringifier.es6#L25-L27)
|
||||
that accepts initial Node and semicolon indicator.
|
||||
You can learn more by checking [stringifier.es6](https://github.com/postcss/postcss/blob/master/lib/stringifier.es6)
|
||||
|
||||
### API Reference
|
||||
|
||||
More descriptive API documentation could be found [here](http://api.postcss.org/)
|
||||
195
node_modules/postcss/docs/guidelines/plugin.md
generated
vendored
195
node_modules/postcss/docs/guidelines/plugin.md
generated
vendored
@@ -1,195 +0,0 @@
|
||||
# PostCSS Plugin Guidelines
|
||||
|
||||
A PostCSS plugin is a function that receives and, usually,
|
||||
transforms a CSS AST from the PostCSS parser.
|
||||
|
||||
The rules below are *mandatory* for all PostCSS plugins.
|
||||
|
||||
See also [ClojureWerkz’s recommendations] for open source projects.
|
||||
|
||||
[ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/
|
||||
|
||||
## 1. API
|
||||
|
||||
### 1.1 Clear name with `postcss-` prefix
|
||||
|
||||
The plugin’s purpose should be clear just by reading its name.
|
||||
If you wrote a transpiler for CSS 4 Custom Media, `postcss-custom-media`
|
||||
would be a good name. If you wrote a plugin to support mixins,
|
||||
`postcss-mixins` would be a good name.
|
||||
|
||||
The prefix `postcss-` shows that the plugin is part of the PostCSS ecosystem.
|
||||
|
||||
This rule is not mandatory for plugins that can run as independent tools,
|
||||
without the user necessarily knowing that it is powered by
|
||||
PostCSS — for example, [RTLCSS] and [Autoprefixer].
|
||||
|
||||
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
||||
[RTLCSS]: https://rtlcss.com/
|
||||
|
||||
### 1.2. Do one thing, and do it well
|
||||
|
||||
Do not create multitool plugins. Several small, one-purpose plugins bundled into
|
||||
a plugin pack is usually a better solution.
|
||||
|
||||
For example, [`postcss-preset-env`] contains many small plugins,
|
||||
one for each W3C specification. And [`cssnano`] contains a separate plugin
|
||||
for each of its optimization.
|
||||
|
||||
[`postcss-preset-env`]: https://preset-env.cssdb.org/
|
||||
[`cssnano`]: https://github.com/ben-eb/cssnano
|
||||
|
||||
### 1.3. Do not use mixins
|
||||
|
||||
Preprocessors libraries like Compass provide an API with mixins.
|
||||
|
||||
PostCSS plugins are different.
|
||||
A plugin cannot be just a set of mixins for [`postcss-mixins`].
|
||||
|
||||
To achieve your goal, consider transforming valid CSS
|
||||
or using custom at-rules and custom properties.
|
||||
|
||||
[`postcss-mixins`]: https://github.com/postcss/postcss-mixins
|
||||
|
||||
### 1.4. Create plugin by `postcss.plugin`
|
||||
|
||||
By wrapping your function in this method,
|
||||
you are hooking into a common plugin API:
|
||||
|
||||
```js
|
||||
module.exports = postcss.plugin('plugin-name', opts => {
|
||||
return (root, result) => {
|
||||
// Plugin code
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## 2. Processing
|
||||
|
||||
### 2.1. Plugin must be tested
|
||||
|
||||
A CI service like [Travis] is also recommended for testing code in
|
||||
different environments. You should test in (at least) Node.js [active LTS](https://github.com/nodejs/LTS) and current stable version.
|
||||
|
||||
[Travis]: https://travis-ci.org/
|
||||
|
||||
### 2.2. Use asynchronous methods whenever possible
|
||||
|
||||
For example, use `fs.writeFile` instead of `fs.writeFileSync`:
|
||||
|
||||
```js
|
||||
postcss.plugin('plugin-sprite', opts => {
|
||||
return (root, result) => {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const sprite = makeSprite()
|
||||
fs.writeFile(opts.file, sprite, err => {
|
||||
if (err) return reject(err)
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### 2.3. Set `node.source` for new nodes
|
||||
|
||||
Every node must have a relevant `source` so PostCSS can generate
|
||||
an accurate source map.
|
||||
|
||||
So if you add a new declaration based on some existing declaration, you should
|
||||
clone the existing declaration in order to save that original `source`.
|
||||
|
||||
```js
|
||||
if (needPrefix(decl.prop)) {
|
||||
decl.cloneBefore({ prop: '-webkit-' + decl.prop })
|
||||
}
|
||||
```
|
||||
|
||||
You can also set `source` directly, copying from some existing node:
|
||||
|
||||
```js
|
||||
if (decl.prop === 'animation') {
|
||||
const keyframe = createAnimationByName(decl.value)
|
||||
keyframes.source = decl.source
|
||||
decl.root().append(keyframes)
|
||||
}
|
||||
```
|
||||
|
||||
### 2.4. Use only the public PostCSS API
|
||||
|
||||
PostCSS plugins must not rely on undocumented properties or methods,
|
||||
which may be subject to change in any minor release. The public API
|
||||
is described in [API docs].
|
||||
|
||||
[API docs]: http://api.postcss.org/
|
||||
|
||||
## 3. Errors
|
||||
|
||||
### 3.1. Use `node.error` on CSS relevant errors
|
||||
|
||||
If you have an error because of input CSS (like an unknown name
|
||||
in a mixin plugin) you should use `node.error` to create an error
|
||||
that includes source position:
|
||||
|
||||
```js
|
||||
if (typeof mixins[name] === 'undefined') {
|
||||
throw decl.error('Unknown mixin ' + name, { plugin: 'postcss-mixins' })
|
||||
}
|
||||
```
|
||||
|
||||
### 3.2. Use `result.warn` for warnings
|
||||
|
||||
Do not print warnings with `console.log` or `console.warn`,
|
||||
because some PostCSS runner may not allow console output.
|
||||
|
||||
```js
|
||||
if (outdated(decl.prop)) {
|
||||
result.warn(decl.prop + ' is outdated', { node: decl })
|
||||
}
|
||||
```
|
||||
|
||||
If CSS input is a source of the warning, the plugin must set the `node` option.
|
||||
|
||||
## 4. Documentation
|
||||
|
||||
### 4.1. Document your plugin in English
|
||||
|
||||
PostCSS plugins must have their `README.md` wrote in English. Do not be afraid
|
||||
of your English skills, as the open source community will fix your errors.
|
||||
|
||||
Of course, you are welcome to write documentation in other languages;
|
||||
just name them appropriately (e.g. `README.ja.md`).
|
||||
|
||||
### 4.2. Include input and output examples
|
||||
|
||||
The plugin's `README.md` must contain example input and output CSS.
|
||||
A clear example is the best way to describe how your plugin works.
|
||||
|
||||
The first section of the `README.md` is a good place to put examples.
|
||||
See [postcss-opacity](https://github.com/iamvdo/postcss-opacity) for an example.
|
||||
|
||||
Of course, this guideline does not apply if your plugin does not
|
||||
transform the CSS.
|
||||
|
||||
### 4.3. Maintain a changelog
|
||||
|
||||
PostCSS plugins must describe the changes of all their releases
|
||||
in a separate file, such as `CHANGELOG.md`, `History.md`, or [GitHub Releases].
|
||||
Visit [Keep A Changelog] for more information about how to write one of these.
|
||||
|
||||
Of course, you should be using [SemVer].
|
||||
|
||||
[Keep A Changelog]: http://keepachangelog.com/
|
||||
[GitHub Releases]: https://help.github.com/articles/creating-releases/
|
||||
[SemVer]: http://semver.org/
|
||||
|
||||
### 4.4. Include `postcss-plugin` keyword in `package.json`
|
||||
|
||||
PostCSS plugins written for npm must have the `postcss-plugin` keyword
|
||||
in their `package.json`. This special keyword will be useful for feedback about
|
||||
the PostCSS ecosystem.
|
||||
|
||||
For packages not published to npm, this is not mandatory, but is recommended
|
||||
if the package format can contain keywords.
|
||||
143
node_modules/postcss/docs/guidelines/runner.md
generated
vendored
143
node_modules/postcss/docs/guidelines/runner.md
generated
vendored
@@ -1,143 +0,0 @@
|
||||
# PostCSS Runner Guidelines
|
||||
|
||||
A PostCSS runner is a tool that processes CSS through a user-defined list
|
||||
of plugins; for example, [`postcss-cli`] or [`gulp‑postcss`].
|
||||
These rules are mandatory for any such runners.
|
||||
|
||||
For single-plugin tools, like [`gulp-autoprefixer`],
|
||||
these rules are not mandatory but are highly recommended.
|
||||
|
||||
See also [ClojureWerkz’s recommendations] for open source projects.
|
||||
|
||||
[ClojureWerkz’s recommendations]: http://blog.clojurewerkz.org/blog/2013/04/20/how-to-make-your-open-source-project-really-awesome/
|
||||
[`gulp-autoprefixer`]: https://github.com/sindresorhus/gulp-autoprefixer
|
||||
[`gulp‑postcss`]: https://github.com/w0rm/gulp-postcss
|
||||
[`postcss-cli`]: https://github.com/postcss/postcss-cli
|
||||
|
||||
## 1. API
|
||||
|
||||
### 1.1. Accept functions in plugin parameters
|
||||
|
||||
If your runner uses a config file, it must be written in JavaScript, so that
|
||||
it can support plugins which accept a function, such as [`postcss-assets`]:
|
||||
|
||||
```js
|
||||
module.exports = [
|
||||
require('postcss-assets')({
|
||||
cachebuster: function (file) {
|
||||
return fs.statSync(file).mtime.getTime().toString(16)
|
||||
}
|
||||
})
|
||||
]
|
||||
```
|
||||
|
||||
[`postcss-assets`]: https://github.com/borodean/postcss-assets
|
||||
|
||||
## 2. Processing
|
||||
|
||||
### 2.1. Set `from` and `to` processing options
|
||||
|
||||
To ensure that PostCSS generates source maps and displays better syntax errors,
|
||||
runners must specify the `from` and `to` options. If your runner does not handle
|
||||
writing to disk (for example, a gulp transform), you should set both options
|
||||
to point to the same file:
|
||||
|
||||
```js
|
||||
processor.process({ from: file.path, to: file.path })
|
||||
```
|
||||
|
||||
### 2.2. Use only the asynchronous API
|
||||
|
||||
PostCSS runners must use only the asynchronous API.
|
||||
The synchronous API is provided only for debugging, is slower,
|
||||
and can’t work with asynchronous plugins.
|
||||
|
||||
```js
|
||||
processor.process(opts).then(result => {
|
||||
// processing is finished
|
||||
});
|
||||
```
|
||||
|
||||
### 2.3. Use only the public PostCSS API
|
||||
|
||||
PostCSS runners must not rely on undocumented properties or methods,
|
||||
which may be subject to change in any minor release. The public API
|
||||
is described in [API docs].
|
||||
|
||||
[API docs]: http://api.postcss.org/
|
||||
|
||||
## 3. Output
|
||||
|
||||
### 3.1. Don’t show JS stack for `CssSyntaxError`
|
||||
|
||||
PostCSS runners must not show a stack trace for CSS syntax errors,
|
||||
as the runner can be used by developers who are not familiar with JavaScript.
|
||||
Instead, handle such errors gracefully:
|
||||
|
||||
```js
|
||||
processor.process(opts).catch(error => {
|
||||
if (error.name === 'CssSyntaxError') {
|
||||
process.stderr.write(error.message + error.showSourceCode())
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### 3.2. Display `result.warnings()`
|
||||
|
||||
PostCSS runners must output warnings from `result.warnings()`:
|
||||
|
||||
```js
|
||||
result.warnings().forEach(warn => {
|
||||
process.stderr.write(warn.toString())
|
||||
})
|
||||
```
|
||||
|
||||
See also [postcss-log-warnings] and [postcss-messages] plugins.
|
||||
|
||||
[postcss-log-warnings]: https://github.com/davidtheclark/postcss-log-warnings
|
||||
[postcss-messages]: https://github.com/postcss/postcss-messages
|
||||
|
||||
### 3.3. Allow the user to write source maps to different files
|
||||
|
||||
PostCSS by default will inline source maps in the generated file; however,
|
||||
PostCSS runners must provide an option to save the source map in a different
|
||||
file:
|
||||
|
||||
```js
|
||||
if (result.map) {
|
||||
fs.writeFile(opts.to + '.map', result.map.toString())
|
||||
}
|
||||
```
|
||||
|
||||
## 4. Documentation
|
||||
|
||||
### 4.1. Document your runner in English
|
||||
|
||||
PostCSS runners must have their `README.md` wrote in English. Do not be afraid
|
||||
of your English skills, as the open source community will fix your errors.
|
||||
|
||||
Of course, you are welcome to write documentation in other languages;
|
||||
just name them appropriately (e.g. `README.ja.md`).
|
||||
|
||||
### 4.2. Maintain a changelog
|
||||
|
||||
PostCSS runners must describe changes of all releases in a separate file,
|
||||
such as `ChangeLog.md`, `History.md`, or with [GitHub Releases].
|
||||
Visit [Keep A Changelog] for more information on how to write one of these.
|
||||
|
||||
Of course, you should use [SemVer].
|
||||
|
||||
[Keep A Changelog]: http://keepachangelog.com/
|
||||
[GitHub Releases]: https://help.github.com/articles/creating-releases/
|
||||
[SemVer]: http://semver.org/
|
||||
|
||||
### 4.3. `postcss-runner` keyword in `package.json`
|
||||
|
||||
PostCSS runners written for npm must have the `postcss-runner` keyword
|
||||
in their `package.json`. This special keyword will be useful for feedback about
|
||||
the PostCSS ecosystem.
|
||||
|
||||
For packages not published to npm, this is not mandatory, but recommended
|
||||
if the package format is allowed to contain keywords.
|
||||
74
node_modules/postcss/docs/source-maps.md
generated
vendored
74
node_modules/postcss/docs/source-maps.md
generated
vendored
@@ -1,74 +0,0 @@
|
||||
# PostCSS and Source Maps
|
||||
|
||||
PostCSS has great [source maps] support. It can read and interpret maps
|
||||
from previous transformation steps, autodetect the format that you expect,
|
||||
and output both external and inline maps.
|
||||
|
||||
To ensure that you generate an accurate source map, you must indicate the input
|
||||
and output CSS file paths — using the options `from` and `to`, respectively.
|
||||
|
||||
To generate a new source map with the default options, simply set `map: true`.
|
||||
This will generate an inline source map that contains the source content.
|
||||
If you don’t want the map inlined, you can set `map.inline: false`.
|
||||
|
||||
```js
|
||||
processor
|
||||
.process(css, {
|
||||
from: 'app.sass.css',
|
||||
to: 'app.css',
|
||||
map: { inline: false }
|
||||
})
|
||||
.then(result => {
|
||||
result.map //=> '{ "version":3,
|
||||
// "file":"app.css",
|
||||
// "sources":["app.sass"],
|
||||
// "mappings":"AAAA,KAAI" }'
|
||||
})
|
||||
```
|
||||
|
||||
If PostCSS finds source maps from a previous transformation,
|
||||
it will automatically update that source map with the same options.
|
||||
|
||||
## Options
|
||||
|
||||
If you want more control over source map generation, you can define the `map`
|
||||
option as an object with the following parameters:
|
||||
|
||||
* `inline` boolean: indicates that the source map should be embedded
|
||||
in the output CSS as a Base64-encoded comment. By default, it is `true`.
|
||||
But if all previous maps are external, not inline, PostCSS will not embed
|
||||
the map even if you do not set this option.
|
||||
|
||||
If you have an inline source map, the `result.map` property will be empty,
|
||||
as the source map will be contained within the text of `result.css`.
|
||||
|
||||
* `prev` string, object, boolean or function: source map content from
|
||||
a previous processing step (for example, Sass compilation).
|
||||
PostCSS will try to read the previous source map automatically
|
||||
(based on comments within the source CSS), but you can use this option
|
||||
to identify it manually. If desired, you can omit the previous map
|
||||
with `prev: false`.
|
||||
|
||||
* `sourcesContent` boolean: indicates that PostCSS should set the origin
|
||||
content (for example, Sass source) of the source map. By default,
|
||||
it is `true`. But if all previous maps do not contain sources content,
|
||||
PostCSS will also leave it out even if you do not set this option.
|
||||
|
||||
* `annotation` boolean or string: indicates that PostCSS should add annotation
|
||||
comments to the CSS. By default, PostCSS will always add a comment with a path
|
||||
to the source map. PostCSS will not add annotations to CSS files that
|
||||
do not contain any comments.
|
||||
|
||||
By default, PostCSS presumes that you want to save the source map as
|
||||
`opts.to + '.map'` and will use this path in the annotation comment.
|
||||
A different path can be set by providing a string value for `annotation`.
|
||||
|
||||
If you have set `inline: true`, annotation cannot be disabled.
|
||||
|
||||
* `from` string: by default, PostCSS will set the `sources` property of the map
|
||||
to the value of the `from` option. If you want to override this behaviour, you
|
||||
can use `map.from` to explicitly set the source map's `sources` property.
|
||||
Path should be absolute or relative from generated file
|
||||
(`to` option in `process()` method).
|
||||
|
||||
[source maps]: http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/
|
||||
233
node_modules/postcss/docs/syntax.md
generated
vendored
233
node_modules/postcss/docs/syntax.md
generated
vendored
@@ -1,233 +0,0 @@
|
||||
# How to Write Custom Syntax
|
||||
|
||||
PostCSS can transform styles in any syntax, and is not limited to just CSS.
|
||||
By writing a custom syntax, you can transform styles in any desired format.
|
||||
|
||||
Writing a custom syntax is much harder than writing a PostCSS plugin, but
|
||||
it is an awesome adventure.
|
||||
|
||||
There are 3 types of PostCSS syntax packages:
|
||||
|
||||
* **Parser** to parse input string to node’s tree.
|
||||
* **Stringifier** to generate output string by node’s tree.
|
||||
* **Syntax** contains both parser and stringifier.
|
||||
|
||||
## Syntax
|
||||
|
||||
A good example of a custom syntax is [SCSS]. Some users may want to transform
|
||||
SCSS sources with PostCSS plugins, for example if they need to add vendor
|
||||
prefixes or change the property order. So this syntax should output SCSS from
|
||||
an SCSS input.
|
||||
|
||||
The syntax API is a very simple plain object, with `parse` & `stringify`
|
||||
functions:
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
parse: require('./parse'),
|
||||
stringify: require('./stringify')
|
||||
}
|
||||
```
|
||||
|
||||
[SCSS]: https://github.com/postcss/postcss-scss
|
||||
|
||||
## Parser
|
||||
|
||||
A good example of a parser is [Safe Parser], which parses malformed/broken CSS.
|
||||
Because there is no point to generate broken output, this package only provides
|
||||
a parser.
|
||||
|
||||
The parser API is a function which receives a string & returns a [`Root`] node.
|
||||
The second argument is a function which receives an object with PostCSS options.
|
||||
|
||||
```js
|
||||
const postcss = require('postcss')
|
||||
|
||||
module.exports = function parse (css, opts) {
|
||||
const root = postcss.root()
|
||||
// Add other nodes to root
|
||||
return root
|
||||
}
|
||||
```
|
||||
|
||||
[Safe Parser]: https://github.com/postcss/postcss-safe-parser
|
||||
[`Root`]: http://api.postcss.org/Root.html
|
||||
|
||||
### Main Theory
|
||||
|
||||
There are many books about parsers; but do not worry because CSS syntax is
|
||||
very easy, and so the parser will be much simpler than a programming language
|
||||
parser.
|
||||
|
||||
The default PostCSS parser contains two steps:
|
||||
|
||||
1. [Tokenizer] which reads input string character by character and builds a
|
||||
tokens array. For example, it joins space symbols to a `['space', '\n ']`
|
||||
token, and detects strings to a `['string', '"\"{"']` token.
|
||||
2. [Parser] which reads the tokens array, creates node instances and
|
||||
builds a tree.
|
||||
|
||||
[Tokenizer]: https://github.com/postcss/postcss/blob/master/lib/tokenize.es6
|
||||
[Parser]: https://github.com/postcss/postcss/blob/master/lib/parser.es6
|
||||
|
||||
### Performance
|
||||
|
||||
Parsing input is often the most time consuming task in CSS processors. So it
|
||||
is very important to have a fast parser.
|
||||
|
||||
The main rule of optimization is that there is no performance without a
|
||||
benchmark. You can look at [PostCSS benchmarks] to build your own.
|
||||
|
||||
Of parsing tasks, the tokenize step will often take the most time, so its
|
||||
performance should be prioritized. Unfortunately, classes, functions and
|
||||
high level structures can slow down your tokenizer. Be ready to write dirty
|
||||
code with repeated statements. This is why it is difficult to extend the
|
||||
default [PostCSS tokenizer]; copy & paste will be a necessary evil.
|
||||
|
||||
Second optimization is using character codes instead of strings.
|
||||
|
||||
```js
|
||||
// Slow
|
||||
string[i] === '{'
|
||||
|
||||
// Fast
|
||||
const OPEN_CURLY = 123 // `{'
|
||||
string.charCodeAt(i) === OPEN_CURLY
|
||||
```
|
||||
|
||||
Third optimization is “fast jumps”. If you find open quotes, you can find
|
||||
next closing quote much faster by `indexOf`:
|
||||
|
||||
```js
|
||||
// Simple jump
|
||||
next = string.indexOf('"', currentPosition + 1)
|
||||
|
||||
// Jump by RegExp
|
||||
regexp.lastIndex = currentPosion + 1
|
||||
regexp.test(string)
|
||||
next = regexp.lastIndex
|
||||
```
|
||||
|
||||
The parser can be a well written class. There is no need in copy-paste and
|
||||
hardcore optimization there. You can extend the default [PostCSS parser].
|
||||
|
||||
[PostCSS benchmarks]: https://github.com/postcss/benchmark
|
||||
[PostCSS tokenizer]: https://github.com/postcss/postcss/blob/master/lib/tokenize.es6
|
||||
[PostCSS parser]: https://github.com/postcss/postcss/blob/master/lib/parser.es6
|
||||
|
||||
### Node Source
|
||||
|
||||
Every node should have `source` property to generate correct source map.
|
||||
This property contains `start` and `end` properties with `{ line, column }`,
|
||||
and `input` property with an [`Input`] instance.
|
||||
|
||||
Your tokenizer should save the original position so that you can propagate
|
||||
the values to the parser, to ensure that the source map is correctly updated.
|
||||
|
||||
[`Input`]: https://github.com/postcss/postcss/blob/master/lib/input.es6
|
||||
|
||||
### Raw Values
|
||||
|
||||
A good PostCSS parser should provide all information (including spaces symbols)
|
||||
to generate byte-to-byte equal output. It is not so difficult, but respectful
|
||||
for user input and allow integration smoke tests.
|
||||
|
||||
A parser should save all additional symbols to `node.raws` object.
|
||||
It is an open structure for you, you can add additional keys.
|
||||
For example, [SCSS parser] saves comment types (`/* */` or `//`)
|
||||
in `node.raws.inline`.
|
||||
|
||||
The default parser cleans CSS values from comments and spaces.
|
||||
It saves the original value with comments to `node.raws.value.raw` and uses it,
|
||||
if the node value was not changed.
|
||||
|
||||
[SCSS parser]: https://github.com/postcss/postcss-scss
|
||||
|
||||
### Tests
|
||||
|
||||
Of course, all parsers in the PostCSS ecosystem must have tests.
|
||||
|
||||
If your parser just extends CSS syntax (like [SCSS] or [Safe Parser]),
|
||||
you can use the [PostCSS Parser Tests]. It contains unit & integration tests.
|
||||
|
||||
[PostCSS Parser Tests]: https://github.com/postcss/postcss-parser-tests
|
||||
|
||||
## Stringifier
|
||||
|
||||
A style guide generator is a good example of a stringifier. It generates output
|
||||
HTML which contains CSS components. For this use case, a parser isn't necessary,
|
||||
so the package should just contain a stringifier.
|
||||
|
||||
The Stringifier API is little bit more complicated, than the parser API.
|
||||
PostCSS generates a source map, so a stringifier can’t just return a string.
|
||||
It must link every substring with its source node.
|
||||
|
||||
A Stringifier is a function which receives [`Root`] node and builder callback.
|
||||
Then it calls builder with every node’s string and node instance.
|
||||
|
||||
```js
|
||||
module.exports = function stringify (root, builder) {
|
||||
// Some magic
|
||||
const string = decl.prop + ':' + decl.value + ';'
|
||||
builder(string, decl)
|
||||
// Some science
|
||||
};
|
||||
```
|
||||
|
||||
### Main Theory
|
||||
|
||||
PostCSS [default stringifier] is just a class with a method for each node type
|
||||
and many methods to detect raw properties.
|
||||
|
||||
In most cases it will be enough just to extend this class,
|
||||
like in [SCSS stringifier].
|
||||
|
||||
[default stringifier]: https://github.com/postcss/postcss/blob/master/lib/stringifier.es6
|
||||
[SCSS stringifier]: https://github.com/postcss/postcss-scss/blob/master/lib/scss-stringifier.es6
|
||||
|
||||
### Builder Function
|
||||
|
||||
A builder function will be passed to `stringify` function as second argument.
|
||||
For example, the default PostCSS stringifier class saves it
|
||||
to `this.builder` property.
|
||||
|
||||
Builder receives output substring and source node to append this substring
|
||||
to the final output.
|
||||
|
||||
Some nodes contain other nodes in the middle. For example, a rule has a `{`
|
||||
at the beginning, many declarations inside and a closing `}`.
|
||||
|
||||
For these cases, you should pass a third argument to builder function:
|
||||
`'start'` or `'end'` string:
|
||||
|
||||
```js
|
||||
this.builder(rule.selector + '{', rule, 'start')
|
||||
// Stringify declarations inside
|
||||
this.builder('}', rule, 'end')
|
||||
```
|
||||
|
||||
### Raw Values
|
||||
|
||||
A good PostCSS custom syntax saves all symbols and provide byte-to-byte equal
|
||||
output if there were no changes.
|
||||
|
||||
This is why every node has `node.raws` object to store space symbol, etc.
|
||||
|
||||
All data related to source code and not CSS structure, should be in `Node#raws`. For instance, `postcss-scss` keep in `Comment#raws.inline` boolean marker of inline comment (`// comment` instead of `/* comment */`).
|
||||
|
||||
Be careful, because sometimes these raw properties will not be present; some
|
||||
nodes may be built manually, or may lose their indentation when they are moved
|
||||
to another parent node.
|
||||
|
||||
This is why the default stringifier has a `raw()` method to autodetect raw
|
||||
properties by other nodes. For example, it will look at other nodes to detect
|
||||
indent size and them multiply it with the current node depth.
|
||||
|
||||
### Tests
|
||||
|
||||
A stringifier must have tests too.
|
||||
|
||||
You can use unit and integration test cases from [PostCSS Parser Tests].
|
||||
Just compare input CSS with CSS after your parser and stringifier.
|
||||
|
||||
[PostCSS Parser Tests]: https://github.com/postcss/postcss-parser-tests
|
||||
136
node_modules/postcss/lib/at-rule.js
generated
vendored
136
node_modules/postcss/lib/at-rule.js
generated
vendored
@@ -1,127 +1,25 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
let Container = require('./container')
|
||||
|
||||
var _container = _interopRequireDefault(require("./container"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* Represents an at-rule.
|
||||
*
|
||||
* If it’s followed in the CSS by a {} block, this node will have
|
||||
* a nodes property representing its children.
|
||||
*
|
||||
* @extends Container
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('@charset "UTF-8"; @media print {}')
|
||||
*
|
||||
* const charset = root.first
|
||||
* charset.type //=> 'atrule'
|
||||
* charset.nodes //=> undefined
|
||||
*
|
||||
* const media = root.last
|
||||
* media.nodes //=> []
|
||||
*/
|
||||
var AtRule = /*#__PURE__*/function (_Container) {
|
||||
_inheritsLoose(AtRule, _Container);
|
||||
|
||||
function AtRule(defaults) {
|
||||
var _this;
|
||||
|
||||
_this = _Container.call(this, defaults) || this;
|
||||
_this.type = 'atrule';
|
||||
return _this;
|
||||
class AtRule extends Container {
|
||||
constructor (defaults) {
|
||||
super(defaults)
|
||||
this.type = 'atrule'
|
||||
}
|
||||
|
||||
var _proto = AtRule.prototype;
|
||||
|
||||
_proto.append = function append() {
|
||||
var _Container$prototype$;
|
||||
|
||||
if (!this.nodes) this.nodes = [];
|
||||
|
||||
for (var _len = arguments.length, children = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
children[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children));
|
||||
};
|
||||
|
||||
_proto.prepend = function prepend() {
|
||||
var _Container$prototype$2;
|
||||
|
||||
if (!this.nodes) this.nodes = [];
|
||||
|
||||
for (var _len2 = arguments.length, children = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||||
children[_key2] = arguments[_key2];
|
||||
}
|
||||
|
||||
return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children));
|
||||
append (...children) {
|
||||
if (!this.proxyOf.nodes) this.nodes = []
|
||||
return super.append(...children)
|
||||
}
|
||||
/**
|
||||
* @memberof AtRule#
|
||||
* @member {string} name The at-rule’s name immediately follows the `@`.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('@media print {}')
|
||||
* media.name //=> 'media'
|
||||
* const media = root.first
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof AtRule#
|
||||
* @member {string} params The at-rule’s parameters, the values
|
||||
* that follow the at-rule’s name but precede
|
||||
* any {} block.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('@media print, screen {}')
|
||||
* const media = root.first
|
||||
* media.params //=> 'print, screen'
|
||||
*/
|
||||
prepend (...children) {
|
||||
if (!this.proxyOf.nodes) this.nodes = []
|
||||
return super.prepend(...children)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof AtRule#
|
||||
* @member {object} raws Information to generate byte-to-byte equal
|
||||
* node string as it was in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
* * `after`: the space symbols after the last child of the node
|
||||
* to the end of the node.
|
||||
* * `between`: the symbols between the property and value
|
||||
* for declarations, selector and `{` for rules, or last parameter
|
||||
* and `{` for at-rules.
|
||||
* * `semicolon`: contains true if the last child has
|
||||
* an (optional) semicolon.
|
||||
* * `afterName`: the space between the at-rule name and its parameters.
|
||||
*
|
||||
* PostCSS cleans at-rule parameters from comments and extra spaces,
|
||||
* but it stores origin content in raws properties.
|
||||
* As such, if you don’t change a declaration’s value,
|
||||
* PostCSS will use the raw value with comments.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse(' @media\nprint {\n}')
|
||||
* root.first.first.raws //=> { before: ' ',
|
||||
* // between: ' ',
|
||||
* // afterName: '\n',
|
||||
* // after: '\n' }
|
||||
*/
|
||||
;
|
||||
module.exports = AtRule
|
||||
AtRule.default = AtRule
|
||||
|
||||
return AtRule;
|
||||
}(_container.default);
|
||||
|
||||
var _default = AtRule;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImF0LXJ1bGUuZXM2Il0sIm5hbWVzIjpbIkF0UnVsZSIsImRlZmF1bHRzIiwidHlwZSIsImFwcGVuZCIsIm5vZGVzIiwiY2hpbGRyZW4iLCJwcmVwZW5kIiwiQ29udGFpbmVyIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0lBa0JNQSxNOzs7QUFDSixrQkFBYUMsUUFBYixFQUF1QjtBQUFBOztBQUNyQixrQ0FBTUEsUUFBTjtBQUNBLFVBQUtD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IH1cbiAgICovXG59XG5cbmV4cG9ydCBkZWZhdWx0IEF0UnVsZVxuIl0sImZpbGUiOiJhdC1ydWxlLmpzIn0=
|
||||
Container.registerAtRule(AtRule)
|
||||
|
||||
60
node_modules/postcss/lib/comment.js
generated
vendored
60
node_modules/postcss/lib/comment.js
generated
vendored
@@ -1,55 +1,13 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
let Node = require('./node')
|
||||
|
||||
var _node = _interopRequireDefault(require("./node"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* Represents a comment between declarations or statements (rule and at-rules).
|
||||
*
|
||||
* Comments inside selectors, at-rule parameters, or declaration values
|
||||
* will be stored in the `raws` properties explained above.
|
||||
*
|
||||
* @extends Node
|
||||
*/
|
||||
var Comment = /*#__PURE__*/function (_Node) {
|
||||
_inheritsLoose(Comment, _Node);
|
||||
|
||||
function Comment(defaults) {
|
||||
var _this;
|
||||
|
||||
_this = _Node.call(this, defaults) || this;
|
||||
_this.type = 'comment';
|
||||
return _this;
|
||||
class Comment extends Node {
|
||||
constructor (defaults) {
|
||||
super(defaults)
|
||||
this.type = 'comment'
|
||||
}
|
||||
/**
|
||||
* @memberof Comment#
|
||||
* @member {string} text The comment’s text.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof Comment#
|
||||
* @member {object} raws Information to generate byte-to-byte equal
|
||||
* node string as it was in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node.
|
||||
* * `left`: the space symbols between `/*` and the comment’s text.
|
||||
* * `right`: the space symbols between the comment’s text.
|
||||
*/
|
||||
|
||||
|
||||
return Comment;
|
||||
}(_node.default);
|
||||
|
||||
var _default = Comment;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQuZXM2Il0sIm5hbWVzIjpbIkNvbW1lbnQiLCJkZWZhdWx0cyIsInR5cGUiLCJOb2RlIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOzs7Ozs7QUFFQTs7Ozs7Ozs7SUFRTUEsTzs7O0FBQ0osbUJBQWFDLFFBQWIsRUFBdUI7QUFBQTs7QUFDckIsNkJBQU1BLFFBQU47QUFDQSxVQUFLQyxJQUFMLEdBQVksU0FBWjtBQUZxQjtBQUd0QjtBQUVEOzs7OztBQUtBOzs7Ozs7Ozs7Ozs7Ozs7RUFYb0JDLGE7O2VBeUJQSCxPIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IE5vZGUgZnJvbSAnLi9ub2RlJ1xuXG4vKipcbiAqIFJlcHJlc2VudHMgYSBjb21tZW50IGJldHdlZW4gZGVjbGFyYXRpb25zIG9yIHN0YXRlbWVudHMgKHJ1bGUgYW5kIGF0LXJ1bGVzKS5cbiAqXG4gKiBDb21tZW50cyBpbnNpZGUgc2VsZWN0b3JzLCBhdC1ydWxlIHBhcmFtZXRlcnMsIG9yIGRlY2xhcmF0aW9uIHZhbHVlc1xuICogd2lsbCBiZSBzdG9yZWQgaW4gdGhlIGByYXdzYCBwcm9wZXJ0aWVzIGV4cGxhaW5lZCBhYm92ZS5cbiAqXG4gKiBAZXh0ZW5kcyBOb2RlXG4gKi9cbmNsYXNzIENvbW1lbnQgZXh0ZW5kcyBOb2RlIHtcbiAgY29uc3RydWN0b3IgKGRlZmF1bHRzKSB7XG4gICAgc3VwZXIoZGVmYXVsdHMpXG4gICAgdGhpcy50eXBlID0gJ2NvbW1lbnQnXG4gIH1cblxuICAvKipcbiAgICogQG1lbWJlcm9mIENvbW1lbnQjXG4gICAqIEBtZW1iZXIge3N0cmluZ30gdGV4dCBUaGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICovXG5cbiAgLyoqXG4gICAqIEBtZW1iZXJvZiBDb21tZW50I1xuICAgKiBAbWVtYmVyIHtvYmplY3R9IHJhd3MgSW5mb3JtYXRpb24gdG8gZ2VuZXJhdGUgYnl0ZS10by1ieXRlIGVxdWFsXG4gICAqICAgICAgICAgICAgICAgICAgICAgICBub2RlIHN0cmluZyBhcyBpdCB3YXMgaW4gdGhlIG9yaWdpbiBpbnB1dC5cbiAgICpcbiAgICogRXZlcnkgcGFyc2VyIHNhdmVzIGl0cyBvd24gcHJvcGVydGllcyxcbiAgICogYnV0IHRoZSBkZWZhdWx0IENTUyBwYXJzZXIgdXNlczpcbiAgICpcbiAgICogKiBgYmVmb3JlYDogdGhlIHNwYWNlIHN5bWJvbHMgYmVmb3JlIHRoZSBub2RlLlxuICAgKiAqIGBsZWZ0YDogdGhlIHNwYWNlIHN5bWJvbHMgYmV0d2VlbiBgLypgIGFuZCB0aGUgY29tbWVudOKAmXMgdGV4dC5cbiAgICogKiBgcmlnaHRgOiB0aGUgc3BhY2Ugc3ltYm9scyBiZXR3ZWVuIHRoZSBjb21tZW504oCZcyB0ZXh0LlxuICAgKi9cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29tbWVudFxuIl0sImZpbGUiOiJjb21tZW50LmpzIn0=
|
||||
module.exports = Comment
|
||||
Comment.default = Comment
|
||||
|
||||
916
node_modules/postcss/lib/container.js
generated
vendored
916
node_modules/postcss/lib/container.js
generated
vendored
File diff suppressed because one or more lines are too long
320
node_modules/postcss/lib/css-syntax-error.js
generated
vendored
320
node_modules/postcss/lib/css-syntax-error.js
generated
vendored
File diff suppressed because one or more lines are too long
110
node_modules/postcss/lib/declaration.js
generated
vendored
110
node_modules/postcss/lib/declaration.js
generated
vendored
@@ -1,96 +1,24 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
let Node = require('./node')
|
||||
|
||||
var _node = _interopRequireDefault(require("./node"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* Represents a CSS declaration.
|
||||
*
|
||||
* @extends Node
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black }')
|
||||
* const decl = root.first.first
|
||||
* decl.type //=> 'decl'
|
||||
* decl.toString() //=> ' color: black'
|
||||
*/
|
||||
var Declaration = /*#__PURE__*/function (_Node) {
|
||||
_inheritsLoose(Declaration, _Node);
|
||||
|
||||
function Declaration(defaults) {
|
||||
var _this;
|
||||
|
||||
_this = _Node.call(this, defaults) || this;
|
||||
_this.type = 'decl';
|
||||
return _this;
|
||||
class Declaration extends Node {
|
||||
constructor (defaults) {
|
||||
if (
|
||||
defaults &&
|
||||
typeof defaults.value !== 'undefined' &&
|
||||
typeof defaults.value !== 'string'
|
||||
) {
|
||||
defaults = { ...defaults, value: String(defaults.value) }
|
||||
}
|
||||
super(defaults)
|
||||
this.type = 'decl'
|
||||
}
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {string} prop The declaration’s property name.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black }')
|
||||
* const decl = root.first.first
|
||||
* decl.prop //=> 'color'
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {string} value The declaration’s value.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black }')
|
||||
* const decl = root.first.first
|
||||
* decl.value //=> 'black'
|
||||
*/
|
||||
get variable () {
|
||||
return this.prop.startsWith('--') || this.prop[0] === '$'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {boolean} important `true` if the declaration
|
||||
* has an !important annotation.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a { color: black !important; color: red }')
|
||||
* root.first.first.important //=> true
|
||||
* root.first.last.important //=> undefined
|
||||
*/
|
||||
|
||||
/**
|
||||
* @memberof Declaration#
|
||||
* @member {object} raws Information to generate byte-to-byte equal
|
||||
* node string as it was in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
* * `between`: the symbols between the property and value
|
||||
* for declarations.
|
||||
* * `important`: the content of the important statement,
|
||||
* if it is not just `!important`.
|
||||
*
|
||||
* PostCSS cleans declaration from comments and extra spaces,
|
||||
* but it stores origin content in raws properties.
|
||||
* As such, if you don’t change a declaration’s value,
|
||||
* PostCSS will use the raw value with comments.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a {\n color:black\n}')
|
||||
* root.first.first.raws //=> { before: '\n ', between: ':' }
|
||||
*/
|
||||
|
||||
|
||||
return Declaration;
|
||||
}(_node.default);
|
||||
|
||||
var _default = Declaration;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uLmVzNiJdLCJuYW1lcyI6WyJEZWNsYXJhdGlvbiIsImRlZmF1bHRzIiwidHlwZSIsIk5vZGUiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7Ozs7OztBQUVBOzs7Ozs7Ozs7OztJQVdNQSxXOzs7QUFDSix1QkFBYUMsUUFBYixFQUF1QjtBQUFBOztBQUNyQiw2QkFBTUEsUUFBTjtBQUNBLFVBQUtDLElBQUwsR0FBWSxNQUFaO0FBRnFCO0FBR3RCO0FBRUQ7Ozs7Ozs7Ozs7QUFVQTs7Ozs7Ozs7OztBQVVBOzs7Ozs7Ozs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dGhlIG5vZGUuIEl0IGFsc28gc3RvcmVzIGAqYFxuICAgKiAgIGFuZCBgX2Agc3ltYm9scyBiZWZvcmUgdGhlIGRlY2xhcmF0aW9uIChJRSBoYWNrKS5cbiAgICogKiBgYmV0d2VlbmA6IHRoZSBzeW1ib2xzIGJldHdlZW4gdGhlIHByb3BlcnR5IGFuZCB2YWx1ZVxuICAgKiAgIGZvciBkZWNsYXJhdGlvbnMuXG4gICAqICogYGltcG9ydGFudGA6IHRoZSBjb250ZW50IG9mIHRoZSBpbXBvcnRhbnQgc3RhdGVtZW50LFxuICAgKiAgIGlmIGl0IGlzIG5vdCBqdXN0IGAhaW1wb3J0YW50YC5cbiAgICpcbiAgICogUG9zdENTUyBjbGVhbnMgZGVjbGFyYXRpb24gZnJvbSBjb21tZW50cyBhbmQgZXh0cmEgc3BhY2VzLFxuICAgKiBidXQgaXQgc3RvcmVzIG9yaWdpbiBjb250ZW50IGluIHJhd3MgcHJvcGVydGllcy5cbiAgICogQXMgc3VjaCwgaWYgeW91IGRvbuKAmXQgY2hhbmdlIGEgZGVjbGFyYXRpb27igJlzIHZhbHVlLFxuICAgKiBQb3N0Q1NTIHdpbGwgdXNlIHRoZSByYXcgdmFsdWUgd2l0aCBjb21tZW50cy5cbiAgICpcbiAgICogQGV4YW1wbGVcbiAgICogY29uc3Qgcm9vdCA9IHBvc3Rjc3MucGFyc2UoJ2Ege1xcbiAgY29sb3I6YmxhY2tcXG59JylcbiAgICogcm9vdC5maXJzdC5maXJzdC5yYXdzIC8vPT4geyBiZWZvcmU6ICdcXG4gICcsIGJldHdlZW46ICc6JyB9XG4gICAqL1xufVxuXG5leHBvcnQgZGVmYXVsdCBEZWNsYXJhdGlvblxuIl0sImZpbGUiOiJkZWNsYXJhdGlvbi5qcyJ9
|
||||
module.exports = Declaration
|
||||
Declaration.default = Declaration
|
||||
|
||||
337
node_modules/postcss/lib/input.js
generated
vendored
337
node_modules/postcss/lib/input.js
generated
vendored
File diff suppressed because one or more lines are too long
806
node_modules/postcss/lib/lazy-result.js
generated
vendored
806
node_modules/postcss/lib/lazy-result.js
generated
vendored
File diff suppressed because one or more lines are too long
111
node_modules/postcss/lib/list.js
generated
vendored
111
node_modules/postcss/lib/list.js
generated
vendored
File diff suppressed because one or more lines are too long
443
node_modules/postcss/lib/map-generator.js
generated
vendored
443
node_modules/postcss/lib/map-generator.js
generated
vendored
File diff suppressed because one or more lines are too long
840
node_modules/postcss/lib/node.js
generated
vendored
840
node_modules/postcss/lib/node.js
generated
vendored
File diff suppressed because one or more lines are too long
50
node_modules/postcss/lib/parse.js
generated
vendored
50
node_modules/postcss/lib/parse.js
generated
vendored
@@ -1,40 +1,42 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
var _parser = _interopRequireDefault(require("./parser"));
|
||||
|
||||
var _input = _interopRequireDefault(require("./input"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function parse(css, opts) {
|
||||
var input = new _input.default(css, opts);
|
||||
var parser = new _parser.default(input);
|
||||
let Container = require('./container')
|
||||
let Parser = require('./parser')
|
||||
let Input = require('./input')
|
||||
|
||||
function parse (css, opts) {
|
||||
let input = new Input(css, opts)
|
||||
let parser = new Parser(input)
|
||||
try {
|
||||
parser.parse();
|
||||
parser.parse()
|
||||
} catch (e) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (e.name === 'CssSyntaxError' && opts && opts.from) {
|
||||
if (/\.scss$/i.test(opts.from)) {
|
||||
e.message += '\nYou tried to parse SCSS with ' + 'the standard CSS parser; ' + 'try again with the postcss-scss parser';
|
||||
e.message +=
|
||||
'\nYou tried to parse SCSS with ' +
|
||||
'the standard CSS parser; ' +
|
||||
'try again with the postcss-scss parser'
|
||||
} else if (/\.sass/i.test(opts.from)) {
|
||||
e.message += '\nYou tried to parse Sass with ' + 'the standard CSS parser; ' + 'try again with the postcss-sass parser';
|
||||
e.message +=
|
||||
'\nYou tried to parse Sass with ' +
|
||||
'the standard CSS parser; ' +
|
||||
'try again with the postcss-sass parser'
|
||||
} else if (/\.less$/i.test(opts.from)) {
|
||||
e.message += '\nYou tried to parse Less with ' + 'the standard CSS parser; ' + 'try again with the postcss-less parser';
|
||||
e.message +=
|
||||
'\nYou tried to parse Less with ' +
|
||||
'the standard CSS parser; ' +
|
||||
'try again with the postcss-less parser'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw e;
|
||||
throw e
|
||||
}
|
||||
|
||||
return parser.root;
|
||||
return parser.root
|
||||
}
|
||||
|
||||
var _default = parse;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhcnNlLmVzNiJdLCJuYW1lcyI6WyJwYXJzZSIsImNzcyIsIm9wdHMiLCJpbnB1dCIsIklucHV0IiwicGFyc2VyIiwiUGFyc2VyIiwiZSIsInByb2Nlc3MiLCJlbnYiLCJOT0RFX0VOViIsIm5hbWUiLCJmcm9tIiwidGVzdCIsIm1lc3NhZ2UiLCJyb290Il0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOztBQUNBOzs7O0FBRUEsU0FBU0EsS0FBVCxDQUFnQkMsR0FBaEIsRUFBcUJDLElBQXJCLEVBQTJCO0FBQ3pCLE1BQUlDLEtBQUssR0FBRyxJQUFJQyxjQUFKLENBQVVILEdBQVYsRUFBZUMsSUFBZixDQUFaO0FBQ0EsTUFBSUcsTUFBTSxHQUFHLElBQUlDLGVBQUosQ0FBV0gsS0FBWCxDQUFiOztBQUNBLE1BQUk7QUFDRkUsSUFBQUEsTUFBTSxDQUFDTCxLQUFQO0FBQ0QsR0FGRCxDQUVFLE9BQU9PLENBQVAsRUFBVTtBQUNWLFFBQUlDLE9BQU8sQ0FBQ0MsR0FBUixDQUFZQyxRQUFaLEtBQXlCLFlBQTdCLEV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BkZWZhdWx0IHBhcnNlXG4iXSwiZmlsZSI6InBhcnNlLmpzIn0=
|
||||
module.exports = parse
|
||||
parse.default = parse
|
||||
|
||||
Container.registerParse(parse)
|
||||
|
||||
786
node_modules/postcss/lib/parser.js
generated
vendored
786
node_modules/postcss/lib/parser.js
generated
vendored
File diff suppressed because one or more lines are too long
1674
node_modules/postcss/lib/postcss.d.ts
generated
vendored
1674
node_modules/postcss/lib/postcss.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
341
node_modules/postcss/lib/postcss.js
generated
vendored
341
node_modules/postcss/lib/postcss.js
generated
vendored
File diff suppressed because one or more lines are too long
231
node_modules/postcss/lib/previous-map.js
generated
vendored
231
node_modules/postcss/lib/previous-map.js
generated
vendored
File diff suppressed because one or more lines are too long
284
node_modules/postcss/lib/processor.js
generated
vendored
284
node_modules/postcss/lib/processor.js
generated
vendored
File diff suppressed because one or more lines are too long
223
node_modules/postcss/lib/result.js
generated
vendored
223
node_modules/postcss/lib/result.js
generated
vendored
File diff suppressed because one or more lines are too long
129
node_modules/postcss/lib/root.js
generated
vendored
129
node_modules/postcss/lib/root.js
generated
vendored
File diff suppressed because one or more lines are too long
129
node_modules/postcss/lib/rule.js
generated
vendored
129
node_modules/postcss/lib/rule.js
generated
vendored
@@ -1,116 +1,27 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
let Container = require('./container')
|
||||
let list = require('./list')
|
||||
|
||||
var _container = _interopRequireDefault(require("./container"));
|
||||
|
||||
var _list = _interopRequireDefault(require("./list"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
||||
|
||||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
|
||||
|
||||
/**
|
||||
* Represents a CSS rule: a selector followed by a declaration block.
|
||||
*
|
||||
* @extends Container
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a{}')
|
||||
* const rule = root.first
|
||||
* rule.type //=> 'rule'
|
||||
* rule.toString() //=> 'a{}'
|
||||
*/
|
||||
var Rule = /*#__PURE__*/function (_Container) {
|
||||
_inheritsLoose(Rule, _Container);
|
||||
|
||||
function Rule(defaults) {
|
||||
var _this;
|
||||
|
||||
_this = _Container.call(this, defaults) || this;
|
||||
_this.type = 'rule';
|
||||
if (!_this.nodes) _this.nodes = [];
|
||||
return _this;
|
||||
class Rule extends Container {
|
||||
constructor (defaults) {
|
||||
super(defaults)
|
||||
this.type = 'rule'
|
||||
if (!this.nodes) this.nodes = []
|
||||
}
|
||||
/**
|
||||
* An array containing the rule’s individual selectors.
|
||||
* Groups of selectors are split at commas.
|
||||
*
|
||||
* @type {string[]}
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a, b { }')
|
||||
* const rule = root.first
|
||||
*
|
||||
* rule.selector //=> 'a, b'
|
||||
* rule.selectors //=> ['a', 'b']
|
||||
*
|
||||
* rule.selectors = ['a', 'strong']
|
||||
* rule.selector //=> 'a, strong'
|
||||
*/
|
||||
|
||||
get selectors () {
|
||||
return list.comma(this.selector)
|
||||
}
|
||||
|
||||
_createClass(Rule, [{
|
||||
key: "selectors",
|
||||
get: function get() {
|
||||
return _list.default.comma(this.selector);
|
||||
},
|
||||
set: function set(values) {
|
||||
var match = this.selector ? this.selector.match(/,\s*/) : null;
|
||||
var sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen');
|
||||
this.selector = values.join(sep);
|
||||
}
|
||||
/**
|
||||
* @memberof Rule#
|
||||
* @member {string} selector The rule’s full selector represented
|
||||
* as a string.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a, b { }')
|
||||
* const rule = root.first
|
||||
* rule.selector //=> 'a, b'
|
||||
*/
|
||||
set selectors (values) {
|
||||
let match = this.selector ? this.selector.match(/,\s*/) : null
|
||||
let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')
|
||||
this.selector = values.join(sep)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @memberof Rule#
|
||||
* @member {object} raws Information to generate byte-to-byte equal
|
||||
* node string as it was in the origin input.
|
||||
*
|
||||
* Every parser saves its own properties,
|
||||
* but the default CSS parser uses:
|
||||
*
|
||||
* * `before`: the space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
* * `after`: the space symbols after the last child of the node
|
||||
* to the end of the node.
|
||||
* * `between`: the symbols between the property and value
|
||||
* for declarations, selector and `{` for rules, or last parameter
|
||||
* and `{` for at-rules.
|
||||
* * `semicolon`: contains `true` if the last child has
|
||||
* an (optional) semicolon.
|
||||
* * `ownSemicolon`: contains `true` if there is semicolon after rule.
|
||||
*
|
||||
* PostCSS cleans selectors from comments and extra spaces,
|
||||
* but it stores origin content in raws properties.
|
||||
* As such, if you don’t change a declaration’s value,
|
||||
* PostCSS will use the raw value with comments.
|
||||
*
|
||||
* @example
|
||||
* const root = postcss.parse('a {\n color:black\n}')
|
||||
* root.first.first.raws //=> { before: '', between: ' ', after: '\n' }
|
||||
*/
|
||||
module.exports = Rule
|
||||
Rule.default = Rule
|
||||
|
||||
}]);
|
||||
|
||||
return Rule;
|
||||
}(_container.default);
|
||||
|
||||
var _default = Rule;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGUuZXM2Il0sIm5hbWVzIjpbIlJ1bGUiLC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FBvc3RDU1Mgd2lsbCB1c2UgdGhlIHJhdyB2YWx1ZSB3aXRoIGNvbW1lbnRzLlxuICAgKlxuICAgKiBAZXhhbXBsZVxuICAgKiBjb25zdCByb290ID0gcG9zdGNzcy5wYXJzZSgnYSB7XFxuICBjb2xvcjpibGFja1xcbn0nKVxuICAgKiByb290LmZpcnN0LmZpcnN0LnJhd3MgLy89PiB7IGJlZm9yZTogJycsIGJldHdlZW46ICcgJywgYWZ0ZXI6ICdcXG4nIH1cbiAgICovXG59XG5cbmV4cG9ydCBkZWZhdWx0IFJ1bGVcbiJdLCJmaWxlIjoicnVsZS5qcyJ9
|
||||
Container.registerRule(Rule)
|
||||
|
||||
446
node_modules/postcss/lib/stringifier.js
generated
vendored
446
node_modules/postcss/lib/stringifier.js
generated
vendored
File diff suppressed because one or more lines are too long
21
node_modules/postcss/lib/stringify.js
generated
vendored
21
node_modules/postcss/lib/stringify.js
generated
vendored
@@ -1,18 +1,11 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
let Stringifier = require('./stringifier')
|
||||
|
||||
var _stringifier = _interopRequireDefault(require("./stringifier"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function stringify(node, builder) {
|
||||
var str = new _stringifier.default(builder);
|
||||
str.stringify(node);
|
||||
function stringify (node, builder) {
|
||||
let str = new Stringifier(builder)
|
||||
str.stringify(node)
|
||||
}
|
||||
|
||||
var _default = stringify;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmeS5lczYiXSwibmFtZXMiOlsic3RyaW5naWZ5Iiwibm9kZSIsImJ1aWxkZXIiLCJzdHIiLCJTdHJpbmdpZmllciJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTs7OztBQUVBLFNBQVNBLFNBQVQsQ0FBb0JDLElBQXBCLEVBQTBCQyxPQUExQixFQUFtQztBQUNqQyxNQUFJQyxHQUFHLEdBQUcsSUFBSUMsb0JBQUosQ0FBZ0JGLE9BQWhCLENBQVY7QUFDQUMsRUFBQUEsR0FBRyxDQUFDSCxTQUFKLENBQWNDLElBQWQ7QUFDRDs7ZUFFY0QsUyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBTdHJpbmdpZmllciBmcm9tICcuL3N0cmluZ2lmaWVyJ1xuXG5mdW5jdGlvbiBzdHJpbmdpZnkgKG5vZGUsIGJ1aWxkZXIpIHtcbiAgbGV0IHN0ciA9IG5ldyBTdHJpbmdpZmllcihidWlsZGVyKVxuICBzdHIuc3RyaW5naWZ5KG5vZGUpXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0cmluZ2lmeVxuIl0sImZpbGUiOiJzdHJpbmdpZnkuanMifQ==
|
||||
module.exports = stringify
|
||||
stringify.default = stringify
|
||||
|
||||
110
node_modules/postcss/lib/terminal-highlight.js
generated
vendored
110
node_modules/postcss/lib/terminal-highlight.js
generated
vendored
@@ -1,84 +1,70 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
let { cyan, gray, green, yellow, magenta } = require('colorette')
|
||||
|
||||
var _chalk = _interopRequireDefault(require("chalk"));
|
||||
let tokenizer = require('./tokenize')
|
||||
|
||||
var _tokenize = _interopRequireDefault(require("./tokenize"));
|
||||
let Input
|
||||
|
||||
var _input = _interopRequireDefault(require("./input"));
|
||||
function registerInput (dependant) {
|
||||
Input = dependant
|
||||
}
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var HIGHLIGHT_THEME = {
|
||||
'brackets': _chalk.default.cyan,
|
||||
'at-word': _chalk.default.cyan,
|
||||
'comment': _chalk.default.gray,
|
||||
'string': _chalk.default.green,
|
||||
'class': _chalk.default.yellow,
|
||||
'call': _chalk.default.cyan,
|
||||
'hash': _chalk.default.magenta,
|
||||
'(': _chalk.default.cyan,
|
||||
')': _chalk.default.cyan,
|
||||
'{': _chalk.default.yellow,
|
||||
'}': _chalk.default.yellow,
|
||||
'[': _chalk.default.yellow,
|
||||
']': _chalk.default.yellow,
|
||||
':': _chalk.default.yellow,
|
||||
';': _chalk.default.yellow
|
||||
};
|
||||
|
||||
function getTokenType(_ref, processor) {
|
||||
var type = _ref[0],
|
||||
value = _ref[1];
|
||||
const HIGHLIGHT_THEME = {
|
||||
'brackets': cyan,
|
||||
'at-word': cyan,
|
||||
'comment': gray,
|
||||
'string': green,
|
||||
'class': yellow,
|
||||
'hash': magenta,
|
||||
'call': cyan,
|
||||
'(': cyan,
|
||||
')': cyan,
|
||||
'{': yellow,
|
||||
'}': yellow,
|
||||
'[': yellow,
|
||||
']': yellow,
|
||||
':': yellow,
|
||||
';': yellow
|
||||
}
|
||||
|
||||
function getTokenType ([type, value], processor) {
|
||||
if (type === 'word') {
|
||||
if (value[0] === '.') {
|
||||
return 'class';
|
||||
return 'class'
|
||||
}
|
||||
|
||||
if (value[0] === '#') {
|
||||
return 'hash';
|
||||
return 'hash'
|
||||
}
|
||||
}
|
||||
|
||||
if (!processor.endOfFile()) {
|
||||
var next = processor.nextToken();
|
||||
processor.back(next);
|
||||
if (next[0] === 'brackets' || next[0] === '(') return 'call';
|
||||
let next = processor.nextToken()
|
||||
processor.back(next)
|
||||
if (next[0] === 'brackets' || next[0] === '(') return 'call'
|
||||
}
|
||||
|
||||
return type;
|
||||
return type
|
||||
}
|
||||
|
||||
function terminalHighlight(css) {
|
||||
var processor = (0, _tokenize.default)(new _input.default(css), {
|
||||
ignoreErrors: true
|
||||
});
|
||||
var result = '';
|
||||
|
||||
var _loop = function _loop() {
|
||||
var token = processor.nextToken();
|
||||
var color = HIGHLIGHT_THEME[getTokenType(token, processor)];
|
||||
|
||||
if (color) {
|
||||
result += token[1].split(/\r?\n/).map(function (i) {
|
||||
return color(i);
|
||||
}).join('\n');
|
||||
} else {
|
||||
result += token[1];
|
||||
}
|
||||
};
|
||||
|
||||
function terminalHighlight (css) {
|
||||
let processor = tokenizer(new Input(css), { ignoreErrors: true })
|
||||
let result = ''
|
||||
while (!processor.endOfFile()) {
|
||||
_loop();
|
||||
let token = processor.nextToken()
|
||||
let color = HIGHLIGHT_THEME[getTokenType(token, processor)]
|
||||
if (color) {
|
||||
result += token[1]
|
||||
.split(/\r?\n/)
|
||||
.map(i => color(i))
|
||||
.join('\n')
|
||||
} else {
|
||||
result += token[1]
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return result
|
||||
}
|
||||
|
||||
var _default = terminalHighlight;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlcm1pbmFsLWhpZ2hsaWdodC5lczYiXSwibmFtZXMiOlsiSElHSExJR0hUX1RIRU1FIiwiY2hhbGsiLCJjeWFuIiwiZ3JheSIsImdyZWVuIiwieWVsbG93IiwibWFnZW50YSIsImdldFRva2VuVHlwZSIsInByb2Nlc3NvciIsInR5cGUiLCJ2YWx1ZSIsImVuZE9mRmlsZSIsIm5leHQiLCJuZXh0VG9rZW4iLCJiYWNrIiwidGVybWluYWxIaWdobGlnaHQiLCJjc3MiLCJJbnB1dCIsImlnbm9yZUVycm9ycyIsInJlc3VsdCIsInRva2VuIiwiY29sb3IiLCJzcGxpdCIsIm1hcCIsImkiLCJqb2luIl0sIm1hcHBpbmdzIjoiOzs7OztBQUFBOztBQUVBOztBQUNBOzs7O0FBRUEsSUFBTUEsZUFBZSxHQUFHO0FBQ3RCLGNBQVlDLGVBQU1DLElBREk7QUFFdEIsYUFBV0QsZUFBTUMsSUFGSztBQUd0QixhQUFXRCxlQUFNRSxJQUhLO0FBSXRCLFlBQVVGLGVBQU1HLEtBSk07QUFLdEIsV0FBU0gsZUFBT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uID0gcHJvY2Vzc29yLm5leHRUb2tlbigpXG4gICAgbGV0IGNvbG9yID0gSElHSExJR0hUX1RIRU1FW2dldFRva2VuVHlwZSh0b2tlbiwgcHJvY2Vzc29yKV1cbiAgICBpZiAoY29sb3IpIHtcbiAgICAgIHJlc3VsdCArPSB0b2tlblsxXS5zcGxpdCgvXFxyP1xcbi8pXG4gICAgICAgIC5tYXAoaSA9PiBjb2xvcihpKSlcbiAgICAgICAgLmpvaW4oJ1xcbicpXG4gICAgfSBlbHNlIHtcbiAgICAgIHJlc3VsdCArPSB0b2tlblsxXVxuICAgIH1cbiAgfVxuICByZXR1cm4gcmVzdWx0XG59XG5cbmV4cG9ydCBkZWZhdWx0IHRlcm1pbmFsSGlnaGxpZ2h0XG4iXSwiZmlsZSI6InRlcm1pbmFsLWhpZ2hsaWdodC5qcyJ9
|
||||
terminalHighlight.registerInput = registerInput
|
||||
|
||||
module.exports = terminalHighlight
|
||||
|
||||
375
node_modules/postcss/lib/tokenize.js
generated
vendored
375
node_modules/postcss/lib/tokenize.js
generated
vendored
File diff suppressed because one or more lines are too long
53
node_modules/postcss/lib/vendor.js
generated
vendored
53
node_modules/postcss/lib/vendor.js
generated
vendored
@@ -1,53 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
|
||||
/**
|
||||
* Contains helpers for working with vendor prefixes.
|
||||
*
|
||||
* @example
|
||||
* const vendor = postcss.vendor
|
||||
*
|
||||
* @namespace vendor
|
||||
*/
|
||||
var vendor = {
|
||||
/**
|
||||
* Returns the vendor prefix extracted from an input string.
|
||||
*
|
||||
* @param {string} prop String with or without vendor prefix.
|
||||
*
|
||||
* @return {string} vendor prefix or empty string
|
||||
*
|
||||
* @example
|
||||
* postcss.vendor.prefix('-moz-tab-size') //=> '-moz-'
|
||||
* postcss.vendor.prefix('tab-size') //=> ''
|
||||
*/
|
||||
prefix: function prefix(prop) {
|
||||
var match = prop.match(/^(-\w+-)/);
|
||||
|
||||
if (match) {
|
||||
return match[0];
|
||||
}
|
||||
|
||||
return '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the input string stripped of its vendor prefix.
|
||||
*
|
||||
* @param {string} prop String with or without vendor prefix.
|
||||
*
|
||||
* @return {string} String name without vendor prefixes.
|
||||
*
|
||||
* @example
|
||||
* postcss.vendor.unprefixed('-moz-tab-size') //=> 'tab-size'
|
||||
*/
|
||||
unprefixed: function unprefixed(prop) {
|
||||
return prop.replace(/^-\w+-/, '');
|
||||
}
|
||||
};
|
||||
var _default = vendor;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInZlbmRvci5lczYiXSwibmFtZXMiOlsidmVuZG9yIiwicHJlZml4IiwicHJvcCIsIm1hdGNoIiwidW5wcmVmaXhlZCIsInJlcGxhY2UiXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUE7Ozs7Ozs7O0FBUUEsSUFBSUEsTUFBTSxHQUFHO0FBRVg7Ozs7Ozs7Ozs7O0FBV0FDLEVBQUFBLE1BYlcsa0JBYUhDLElBYkcsRUFhRztBQUNaLFFBQUlDLEtBQUssR0FBR0QsSUFBSSxDQUFDQyxLQUFMLENBQVcsVUFBWCxDQUFaOztBQUNBLFFBQUlBLEtBQUosRUFBVztBQUNULGFBQU9BLEtBQUssQ0FBQyxDQUFELENBQVo7QUFDRDs7QUFFRCxXQUFPLEVBQVA7QUFDRCxHQXBCVTs7QUFzQlg7Ozs7Ozs7Ozs7QUFVQUMsRUFBQUEsVUFoQ1csc0JBZ0NDRixJQWhDRCxFQWdDTztBQUNoQixXQUFPQSxJQUFJLENBQUNHLE9BQUwsQ0FBYSxRQUFiLEVBQXVCLEVBQXZCLENBQVA7QUFDRDtBQWxDVSxDQUFiO2VBc0NlTCxNIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb250YWlucyBoZWxwZ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AqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBwb3N0Y3NzLnZlbmRvci51bnByZWZpeGVkKCctbW96LXRhYi1zaXplJykgLy89PiAndGFiLXNpemUnXG4gICAgICovXG4gIHVucHJlZml4ZWQgKHByb3ApIHtcbiAgICByZXR1cm4gcHJvcC5yZXBsYWNlKC9eLVxcdystLywgJycpXG4gIH1cblxufVxuXG5leHBvcnQgZGVmYXVsdCB2ZW5kb3JcbiJdLCJmaWxlIjoidmVuZG9yLmpzIn0=
|
||||
17
node_modules/postcss/lib/warn-once.js
generated
vendored
17
node_modules/postcss/lib/warn-once.js
generated
vendored
@@ -1,17 +1,12 @@
|
||||
"use strict";
|
||||
'use strict'
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = warnOnce;
|
||||
var printed = {};
|
||||
let printed = {}
|
||||
|
||||
function warnOnce(message) {
|
||||
if (printed[message]) return;
|
||||
printed[message] = true;
|
||||
module.exports = function warnOnce (message) {
|
||||
if (printed[message]) return
|
||||
printed[message] = true
|
||||
|
||||
if (typeof console !== 'undefined' && console.warn) {
|
||||
console.warn(message);
|
||||
console.warn(message)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndhcm4tb25jZS5lczYiXSwibmFtZXMiOlsicHJpbnRlZCIsIndhcm5PbmNlIiwibWVzc2FnZSIsImNvbnNvbGUiLCJ3YXJuIl0sIm1hcHBpbmdzIjoiOzs7O0FBQUEsSUFBSUEsT0FBTyxHQUFHLEVBQWQ7O0FBRWUsU0FBU0MsUUFBVCxDQUFtQkMsT0FBbkIsRUFBNEI7QUFDekMsTUFBSUYsT0FBTyxDQUFDRSxPQUFELENBQVgsRUFBc0I7QUFDdEJGLEVBQUFBLE9BQU8sQ0FBQ0UsT0FBRCxDQUFQLEdBQW1CLElBQW5COztBQUVBLE1BQUksT0FBT0MsT0FBUCxLQUFtQixXQUFuQixJQUFrQ0EsT0FBTyxDQUFDQyxJQUE5QyxFQUFvRDtBQUNsREQsSUFBQUEsT0FBTyxDQUFDQyxJQUFSLENBQWFGLE9BQWI7QUFDRDtBQUNGIiwic291cmNlc0NvbnRlbnQiOlsibGV0IHByaW50ZWQgPSB7IH1cblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gd2Fybk9uY2UgKG1lc3NhZ2UpIHtcbiAgaWYgKHByaW50ZWRbbWVzc2FnZV0pIHJldHVyblxuICBwcmludGVkW21lc3NhZ2VdID0gdHJ1ZVxuXG4gIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcgJiYgY29uc29sZS53YXJuKSB7XG4gICAgY29uc29sZS53YXJuKG1lc3NhZ2UpXG4gIH1cbn1cbiJdLCJmaWxlIjoid2Fybi1vbmNlLmpzIn0=
|
||||
|
||||
128
node_modules/postcss/lib/warning.js
generated
vendored
128
node_modules/postcss/lib/warning.js
generated
vendored
File diff suppressed because one or more lines are too long
84
node_modules/postcss/package.json
generated
vendored
84
node_modules/postcss/package.json
generated
vendored
@@ -1,40 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"postcss@7.0.35",
|
||||
"postcss@8.2.6",
|
||||
"J:\\Github\\CURD-TS"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "postcss@7.0.35",
|
||||
"_id": "postcss@7.0.35",
|
||||
"_from": "postcss@8.2.6",
|
||||
"_id": "postcss@8.2.6",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-0r4AuZj38hHYonaXQHny6SuXDiQ=",
|
||||
"_integrity": "sha1-XWmpdFQ7Rfh+RkvEw+OSqX1r6f4=",
|
||||
"_location": "/postcss",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "postcss@7.0.35",
|
||||
"raw": "postcss@8.2.6",
|
||||
"name": "postcss",
|
||||
"escapedName": "postcss",
|
||||
"rawSpec": "7.0.35",
|
||||
"rawSpec": "8.2.6",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "7.0.35"
|
||||
"fetchSpec": "8.2.6"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@vue/compiler-sfc",
|
||||
"/icss-utils",
|
||||
"/postcss-discard-comments",
|
||||
"/postcss-import",
|
||||
"/postcss-modules",
|
||||
"/postcss-modules-extract-imports",
|
||||
"/postcss-modules-local-by-default",
|
||||
"/postcss-modules-scope",
|
||||
"/postcss-modules-values"
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "http://192.168.250.101:4873/postcss/-/postcss-7.0.35.tgz",
|
||||
"_spec": "7.0.35",
|
||||
"_resolved": "http://192.168.250.101:4873/postcss/-/postcss-8.2.6.tgz",
|
||||
"_spec": "8.2.6",
|
||||
"_where": "J:\\Github\\CURD-TS",
|
||||
"author": {
|
||||
"name": "Andrey Sitnik",
|
||||
@@ -42,58 +34,34 @@
|
||||
},
|
||||
"browser": {
|
||||
"./lib/terminal-highlight": false,
|
||||
"supports-color": false,
|
||||
"chalk": false,
|
||||
"colorette": false,
|
||||
"fs": false
|
||||
},
|
||||
"browserslist": [
|
||||
"and_chr 71",
|
||||
"and_ff 64",
|
||||
"and_qq 1.2",
|
||||
"and_uc 11.8",
|
||||
"android 67",
|
||||
"android 4.4.3-4.4.4",
|
||||
"baidu 7.12",
|
||||
"chrome 73",
|
||||
"chrome 72",
|
||||
"edge 18",
|
||||
"edge 17",
|
||||
"firefox 66",
|
||||
"firefox 65",
|
||||
"ios_saf 12.0-12.1",
|
||||
"ios_saf 11.3-11.4",
|
||||
"node 6.17.0",
|
||||
"op_mini all",
|
||||
"op_mob 46",
|
||||
"opera 58",
|
||||
"opera 57",
|
||||
"safari 12",
|
||||
"safari 11.1",
|
||||
"samsung 8.2",
|
||||
"samsung 7.2-7.4"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/postcss/postcss/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^2.4.2",
|
||||
"source-map": "^0.6.1",
|
||||
"supports-color": "^6.1.0"
|
||||
"colorette": "^1.2.1",
|
||||
"nanoid": "^3.1.20",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"description": "Tool for transforming styles with JS plugins",
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
"node": "^10 || ^12 || >=14"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"require": "./lib/postcss.js",
|
||||
"import": "./lib/postcss.mjs",
|
||||
"types": "./lib/postcss.d.ts"
|
||||
},
|
||||
"./": "./"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
"homepage": "https://postcss.org/",
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
"postcss",
|
||||
@@ -106,12 +74,12 @@
|
||||
"transpiler"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/postcss",
|
||||
"main": "./lib/postcss.js",
|
||||
"name": "postcss",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/postcss/postcss.git"
|
||||
},
|
||||
"types": "lib/postcss.d.ts",
|
||||
"version": "7.0.35"
|
||||
"types": "./lib/postcss.d.ts",
|
||||
"version": "8.2.6"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user