- Add npm scripts for CSS/JS compilation (build:css, build:js, build) - Create PowerShell build automation script - Document development workflow in README - Add troubleshooting guide for build issues - Specify proper file structure and compilation process Supports Tailwind CSS v3.4.0 and esbuild bundling with source maps.
34 lines
654 B
JavaScript
34 lines
654 B
JavaScript
'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
|