live-directory
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "live-directory", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A Simple-To-Use Dynamic Template Content Manager For Webservers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,3 @@ const FileSystem = require('fs'); | ||
#path; | ||
#extension = ''; | ||
#content; | ||
@@ -18,5 +19,9 @@ #watcher; | ||
this.#path = path; | ||
const path_chunks = this.#path.split('.'); | ||
this.#extension = path_chunks[path_chunks.length - 1]; | ||
this.#watcher_delay = watcher_delay; | ||
this.#last_update = Date.now() - watcher_delay; | ||
this.#renderer = renderer; | ||
this._init_watcher(); | ||
@@ -137,2 +142,6 @@ this._reload_content(); | ||
get extension() { | ||
return this.#extension; | ||
} | ||
get content() { | ||
@@ -139,0 +148,0 @@ return this.#content; |
33821
638