Przeglądaj źródła

added dist command to generate pages within dist dir

Andi Dittrich 7 lat temu
rodzic
commit
0bfe04a091

+ 7 - 0
config-dist.json

@@ -0,0 +1,7 @@
+{
+    //  Output Filename Scheme - eg. HTTP500.html
+    "scheme": "HTTP%d.html",
+
+    // Footer content (HTML Allowed)
+    "footer": null
+}

+ 1 - 1
dist/HTTP400.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Bad Request <small>Error 400</small></h1><p class="lead">The server cannot process the request due to something that is perceived to be a client error.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP401.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Unauthorized <small>Error 401</small></h1><p class="lead">The requested resource requires an authentication.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP403.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Access Denied <small>Error 403</small></h1><p class="lead">The requested resource requires an authentication.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP404.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Resource not found <small>Error 404</small></h1><p class="lead">The requested resource could not be found but may be available again in the future.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP500.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Webservice currently unavailable <small>Error 500</small></h1><p class="lead">An unexpected condition was encountered.<br />Our service team has been dispatched to bring it back online.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP501.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Not Implemented <small>Error 501</small></h1><p class="lead">The Webserver cannot recognize the request method.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP502.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Webservice currently unavailable <small>Error 502</small></h1><p class="lead">We&#39;ve got some trouble with our backend upstream cluster.<br />Our service team has been dispatched to bring it back online.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP503.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Webservice currently unavailable <small>Error 503</small></h1><p class="lead">We&#39;ve got some trouble with our backend upstream cluster.<br />Our service team has been dispatched to bring it back online.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP520.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Origin Error - Unknown Host <small>Error 520</small></h1><p class="lead">The requested hostname is not routed. Use only hostnames to access resources.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP521.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Webservice currently unavailable <small>Error 521</small></h1><p class="lead">We&#39;ve got some trouble with our backend upstream cluster.<br />Our service team has been dispatched to bring it back online.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

+ 1 - 1
dist/HTTP533.html

@@ -8,6 +8,6 @@
 </head>
 <body>
     <div class="cover"><h1>Scheduled Maintenance <small>Error 533</small></h1><p class="lead">This site is currently down for maintenance.<br />Our service team is working hard to bring it back online soon.</p></div>
-    <footer><p>Tech Contact <a href="mailto:info@example.org">info@example.org</a></p></footer>
+    
 </body>
 </html>

BIN
dist/pages.tar


+ 2 - 2
package.json

@@ -7,9 +7,9 @@
     },
     "scripts": {
         "docs": "node bin/generator.js static docs/config.json --out=docs",
+        "dist": "node bin/generator.js static config-dist.json --out=dist; tar -cf dist/pages.tar dist/*.html",
         "static": "node bin/generator.js static",
-        "gulp": "gulp",
-        "archives": "tar -cf dist/pages.tar dist/*.html"
+        "gulp": "gulp"
     },
     "keywords": [
         "http",