Comment out emailjs/zettair stuff, it will move to the CustomSite object in sites...
authorNick Downing <nick@ndcode.org>
Sun, 18 Nov 2018 03:58:52 +0000 (14:58 +1100)
committerNick Downing <nick@ndcode.org>
Sun, 18 Nov 2018 03:58:52 +0000 (14:58 +1100)
SiteRoot.js
package.json

index b2c8c00..e61cf21 100644 (file)
@@ -5,17 +5,17 @@ let Site = require('./Site')
 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)
@@ -85,16 +85,16 @@ let SiteRoot = function(server, root) {
 
 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
@@ -364,21 +364,21 @@ SiteRoot.prototype.internal_get_text = function(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_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(
@@ -469,9 +469,9 @@ SiteRoot.prototype.internal_modify_json =
     )
   }
 
-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)
 }
@@ -496,9 +496,9 @@ SiteRoot.prototype.get_svg_min = function(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)
 }
index de0eb45..8509d77 100644 (file)
     "@ndcode/disk_build": "^0.1.0",
     "@ndcode/json_cache": "^0.1.0",
     "@ndcode/jst": "^0.1.3",
-    "@ndcode/zettair": "^0.1.3",
-    "babel-cli": "^6.26.0",
     "commander": "^2.18.0",
-    "cookie": "^0.3.1",
-    "emailjs": "^2.2.0",
     "fs": "^0.0.1-security",
     "html-minifier": "^3.5.21",
     "http": "^0.0.0",
@@ -26,7 +22,6 @@
     "svgo": "^1.1.1",
     "uglify-es": "^3.3.9",
     "url": "^0.11.0",
-    "xdate": "^0.8.2",
     "yauzl": "^2.10.0"
   },
   "devDependencies": {},