瀏覽代碼

Create readme file and add the logo.

Lee Morgan 2 天之前
父節點
當前提交
e19da3eb05
共有 2 個文件被更改,包括 71 次插入0 次删除
  1. 40 0
      README.md
  2. 31 0
      logo.svg

+ 40 - 0
README.md

@@ -0,0 +1,40 @@
+<img alt="NeoVan logo" src="logo.svg">
+
+# NeoVan
+
+NeoVan is an "anti-framework" meant to offer some of the convenience of modern frameworks without all of their complexity. The aim is to return to writing plain old HTML, CSS and JavaScript without all the in-between code. In reality, Neovan is mostly just a bundling tool, with a few extra features.  
+
+## Introduction
+
+Neovan uses filesystem-based routing. You create your routes (and components) in the 'routes' directory. Any directory that has either an `index.html` or `index.neovan` file will be considered a route. The index file will pull in any components and bundle all of the HTML, CSS, JS into a single file that will be served for the route.
+
+## Getting Started
+```js
+import express from "express"
+import neovan from "neovan"
+
+let options = {
+    production: true,
+    routesDir: "routes"
+};
+
+const app = await neovan(express, options);
+
+app.listen(8000);
+```
+## Environments
+
+### Production
+Production environment is set by passing `production: true` in the options. Alternatively, you can just not pass this property in since it is the default. When in production mode, all routes will be created at build time and maximally minimized for optimization in a production environment.
+
+Depending on the size of your app, this can take some time due to reading through all files. However, once built, there will be no further work needed. When a user visits a route, the full file is already built and ready to serve to them.
+
+### Development
+Development environment is set by passing `production: false` in the options. When this is set, the routes will not be bundled at build time, in order to avoid large startup times every single time. Routes will be bundled when they are visited.
+
+## Options
+| Property   | Type    | Default | Description                                         |
+|------------|---------|---------|-----------------------------------------------------|
+| production | boolean | true    | Sets environment                                    |
+| routesDir  | string  | routes  | Directory for containing code for routes/components |
+| buildDir   | string  | .build  | Directory where build files will be stored          |

+ 31 - 0
logo.svg

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="280" height="200" viewBox="0 0 280 200">
+  <defs>
+    <linearGradient id="neongrad" x1="140" y1="37" x2="140" y2="163" gradientUnits="userSpaceOnUse">
+      <stop offset="0%" stop-color="#00FFCC" />
+      <stop offset="100%" stop-color="#00CC88" />
+    </linearGradient>
+    <filter id="neonglow" x="-50%" y="-50%" width="200%" height="200%">
+      <feDropShadow dx="0" dy="0" stdDeviation="3" flood-color="#00FFAA" flood-opacity="0.95"/>
+      <feDropShadow dx="0" dy="0" stdDeviation="7" flood-color="#00FFAA" flood-opacity="0.7"/>
+      <feDropShadow dx="0" dy="0" stdDeviation="12" flood-color="#00FFAA" flood-opacity="0.35"/>
+    </filter>
+  </defs>
+
+  <!-- Left bracket -->
+  <g filter="url(#neonglow)">
+    <path d="M 87 37 L 35 100 L 87 163" fill="none" stroke="url(#neongrad)" stroke-width="21" stroke-linecap="round" stroke-linejoin="round"/>
+    <path d="M 87 37 L 35 100 L 87 163" fill="none" stroke="#0a1111" stroke-width="6.5" stroke-linecap="round" stroke-linejoin="round"/>
+  </g>
+
+  <!-- Right bracket -->
+  <g filter="url(#neonglow)">
+    <path d="M 193 37 L 245 100 L 193 163" fill="none" stroke="url(#neongrad)" stroke-width="21" stroke-linecap="round" stroke-linejoin="round"/>
+    <path d="M 193 37 L 245 100 L 193 163" fill="none" stroke="#0a1111" stroke-width="6.5" stroke-linecap="round" stroke-linejoin="round"/>
+  </g>
+
+  <!-- Triangle -->
+  <g filter="url(#neonglow)">
+    <path d="M 140 48 L 99 135 L 181 135 Z" fill="#0a1111" stroke="url(#neongrad)" stroke-width="5.5" stroke-linejoin="round"/>
+  </g>
+</svg>