git ssb

0+

Rômulo Alves / website



Commit 04ef02f04bbaafcd2315aab58dd7be6cfaf19f8c

Upgrades to now v2

Rômulo Alves committed on 11/30/2018, 12:16:49 PM
Parent: 90f1fa10f4cf1eadad9cd3539872fd71cc183030

Files changed

next.config.jschanged
now.jsonchanged
package-lock.jsonchanged
package.jsonchanged
server.jschanged
.dockerignoredeleted
.nowignoreadded
Dockerfiledeleted
next.config.jsView
@@ -1,10 +1,8 @@
1-const withPreact = require('@zeit/next-preact');
2-
3-module.exports = withPreact({
1 +module.exports = {
42 exportPathMap () {
53 return {
64 '/': { page: '/' },
75 '/talks': { page: '/talks' }
86 }
97 }
10-});
8 +};
now.jsonView
@@ -1,12 +1,28 @@
11 {
2- "version": 1,
2 + "version": 2,
33 "name": "romuloalv.es",
4- "type": "static",
54 "alias": [
65 "romuloalv.es",
76 "www.romuloalv.es"
87 ],
9- "env": {
10- "NODE_ENV": "production"
11- }
8 + "routes": [
9 + {
10 + "src": "/.well-known/(.*)",
11 + "dest": "/.well-known/$1",
12 + "headers": {
13 + "content-type": "text/plain",
14 + "content-disposition": "inline; filename=\"dat\""
15 + }
16 + }
17 + ],
18 + "builds": [
19 + {
20 + "src": "package.json",
21 + "use": "@now/static-build"
22 + },
23 + {
24 + "src": ".well-known/*",
25 + "use": "@now/static"
26 + }
27 + ]
1228 }
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 230840 bytes
New file size: 228172 bytes
package.jsonView
@@ -2,13 +2,10 @@
22 "name": "romuloalv.es",
33 "version": "3.0.0",
44 "description": "Rômulo Alves website",
55 "dependencies": {
6- "@zeit/next-preact": "^0.0.7",
76 "next": "^7.0.0",
87 "nprogress": "^0.2.0",
9- "preact": "^8.3.1",
10- "preact-compat": "^3.18.4",
118 "prop-types": "^15.6.2",
129 "react": "^16.5.2",
1310 "react-dom": "^16.5.2",
1411 "time-ago": "^0.2.1"
@@ -17,9 +14,10 @@
1714 "scripts": {
1815 "dev": "NODE_ENV=development node server.js",
1916 "start": "node server.js",
2017 "build": "next build",
21- "export": "next build && next export"
18 + "export": "next build && next export",
19 + "now-build": "npm run export -- -o dist"
2220 },
2321 "repository": {
2422 "type": "git",
2523 "url": "git+https://github.com/romuloalves/romuloalves.github.io.git"
server.jsView
@@ -1,10 +1,6 @@
11 const dev = process.env.NODE_ENV !== 'production';
22
3-if (!dev) {
4- require('@zeit/next-preact/alias')();
5-}
6-
73 const { createServer } = require('http');
84 const { parse } = require('url');
95 const { createReadStream } = require('fs');
106 const { join } = require('path');
@@ -17,9 +13,9 @@
1713 app.prepare()
1814 .then(() => {
1915 createServer((req, res) => {
2016 const parsedUrl = parse(req.url, true);
21- const { pathname, query } = parsedUrl;
17 + const { pathname } = parsedUrl;
2218
2319 if (pathname === '/.well-known/dat') {
2420 res.writeHead(200, { 'Content-Type': 'text/plain' });
2521
.dockerignoreView
@@ -1,7 +1,0 @@
1-*
2-!.well-known/
3-!components
4-!pages
5-!static
6-!next.config.js
7-!*.json
.nowignoreView
@@ -1,0 +1,2 @@
1 +.next/
2 +dist/
DockerfileView
@@ -1,13 +1,0 @@
1-FROM mhart/alpine-node:10
2-
3-WORKDIR /usr/src
4-
5-COPY package.json package-lock.json ./
6-
7-RUN npm ci
8-
9-COPY . .
10-
11-RUN npm run export && \
12- mv out /public && \
13- cp -R .well-known /public/

Built with git-ssb-web