fdsfd
This commit is contained in:
parent
628618df89
commit
e031240dff
3749 changed files with 1120848 additions and 1 deletions
33
node_modules/postcss/lib/document.js
generated
vendored
Normal file
33
node_modules/postcss/lib/document.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
'use strict'
|
||||
|
||||
let Container = require('./container')
|
||||
|
||||
let LazyResult, Processor
|
||||
|
||||
class Document extends Container {
|
||||
constructor(defaults) {
|
||||
// type needs to be passed to super, otherwise child roots won't be normalized correctly
|
||||
super({ type: 'document', ...defaults })
|
||||
|
||||
if (!this.nodes) {
|
||||
this.nodes = []
|
||||
}
|
||||
}
|
||||
|
||||
toResult(opts = {}) {
|
||||
let lazy = new LazyResult(new Processor(), this, opts)
|
||||
|
||||
return lazy.stringify()
|
||||
}
|
||||
}
|
||||
|
||||
Document.registerLazyResult = dependant => {
|
||||
LazyResult = dependant
|
||||
}
|
||||
|
||||
Document.registerProcessor = dependant => {
|
||||
Processor = dependant
|
||||
}
|
||||
|
||||
module.exports = Document
|
||||
Document.default = Document
|
Loading…
Add table
Add a link
Reference in a new issue