let SVGO = require('svgo')
let assert = require('assert')
let disk_build = require('@ndcode/disk_build')
-let emailjs = require('emailjs')
+//let emailjs = require('emailjs')
let fs = require('fs')
let html_minifier = require('html-minifier')
let jst = require('@ndcode/jst')
let less = require('less/lib/less-node')
let path = require('path')
-var stream_buffers = require('stream-buffers')
+let stream_buffers = require('stream-buffers')
let uglify_es = require('uglify-es')
let util = require('util')
let yauzl = require('yauzl')
-let zettair = require('@ndcode/zettair')
+//let zettair = require('@ndcode/zettair')
let fs_mkdir = util.promisify(fs.mkdir)
let fs_readFile = util.promisify(fs.readFile)
SiteRoot.prototype = Object.create(Site.prototype)
-SiteRoot.prototype.internal_get_email = function(pathname) {
- return /*await*/ this.build_cache_email.get(
- pathname,
- async result => {
- let text = await fs_readFile(pathname, {encoding: 'utf-8'})
- console.log('getting', pathname, 'as email')
- result.value = emailjs.server.connect(JSON.parse(text))
- }
- )
-}
+//SiteRoot.prototype.internal_get_email = function(pathname) {
+// return /*await*/ this.build_cache_email.get(
+// pathname,
+// async result => {
+// let text = await fs_readFile(pathname, {encoding: 'utf-8'})
+// console.log('getting', pathname, 'as email')
+// result.value = emailjs.server.connect(JSON.parse(text))
+// }
+// )
+//}
// this is for read-only JSON files
// they will be reloaded from disk if modified
)
}
-SiteRoot.prototype.internal_get_zet = function(pathname) {
- return /*await*/ this.build_cache_zet.get(
- pathname,
- async result => {
- console.log('getting', pathname, 'as zet')
- result.deps = [
- pathname + '.map.0',
- pathname + '.param.0',
- pathname + '.v.0',
- pathname + '.vocab.0'
- ]
- result.value = new zettair.Index(pathname)
- }
- )
-}
+//SiteRoot.prototype.internal_get_zet = function(pathname) {
+// return /*await*/ this.build_cache_zet.get(
+// pathname,
+// async result => {
+// console.log('getting', pathname, 'as zet')
+// result.deps = [
+// pathname + '.map.0',
+// pathname + '.param.0',
+// pathname + '.v.0',
+// pathname + '.vocab.0'
+// ]
+// result.value = new zettair.Index(pathname)
+// }
+// )
+//}
SiteRoot.prototype.internal_get_zip = function(pathname) {
return /*await*/ this.build_cache_zip.get(
)
}
-SiteRoot.prototype.get_email = function(pathname) {
- return /*await*/ this.internal_get_email(this.root + pathname)
-}
+//SiteRoot.prototype.get_email = function(pathname) {
+// return /*await*/ this.internal_get_email(this.root + pathname)
+//}
SiteRoot.prototype.get_json = function(pathname) {
return /*await*/ this.internal_get_json(this.root + pathname)
}
SiteRoot.prototype.get_text = function(pathname) {
return /*await*/ this.internal_get_text(this.root + pathname)
}
-SiteRoot.prototype.get_zet = function(pathname) {
- return /*await*/ this.internal_get_zet(this.root + pathname)
-}
+//SiteRoot.prototype.get_zet = function(pathname) {
+// return /*await*/ this.internal_get_zet(this.root + pathname)
+//}
SiteRoot.prototype.get_zip = function(pathname) {
return /*await*/ this.internal_get_zip(this.root + pathname)
}