Skip to content

Commit 89749dc

Browse files
committed
✨ add sapper home page
1 parent e1dca81 commit 89749dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2686
-351
lines changed

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
# Build output
2-
public/bundle.*
1+
# Build
2+
/src/node_modules/@sapper/
3+
/cypress/screenshots/
4+
/__sapper__/
5+
global.css
36

47
# Environment variables
58
.env
69
.env.build
710
.env.prod
811

12+
# OSX
13+
.DS_Store
14+
915
# Logs
1016
logs
1117
*.log

.vscode/settings.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
},
99
"eslint.autoFixOnSave": true,
1010
"eslint.validate": [
11+
{
12+
"language": "svelte",
13+
"autoFix": true
14+
},
1115
{
1216
"language": "javascript",
1317
"autoFix": true
@@ -16,5 +20,23 @@
1620
"language": "typescript",
1721
"autoFix": true
1822
}
19-
]
23+
],
24+
"workbench.colorCustomizations": {
25+
"activityBarBadge.foreground": "#d69e2e",
26+
"titleBar.activeBackground": "#d69e2e",
27+
"titleBar.inactiveBackground": "#d69e2e99",
28+
"statusBar.background": "#d69e2e",
29+
"sideBar.border": "#d69e2e",
30+
"statusBar.border": "#d69e2e",
31+
"panel.border": "#d69e2e",
32+
"panelTitle.activeBorder": "#d69e2e",
33+
"activityBar.background": "#ecc94b",
34+
"statusBarItem.hoverBackground": "#ecc94b",
35+
"activityBar.foreground": "#2d3748",
36+
"activityBar.inactiveForeground": "#4a5568",
37+
"activityBarBadge.background": "#e7e7e7",
38+
"titleBar.activeForeground": "#e7e7e7",
39+
"statusBar.foreground": "#e7e7e7",
40+
"titleBar.inactiveForeground": "#e7e7e799"
41+
}
2042
}

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
1-
# frapier
1+
# littlebox
22

3-
Serverless functions that are useful to me
3+
Reusable functions and littlemooon site
4+
5+
Built with:
6+
[typescript](http://www.typescriptlang.org/)
7+
[zeit now](https://zeit.co)
8+
[svelte](https://svelte.dev/)
9+
[sapper](https://sapper.svelte.dev/)
10+
[tailwindcss](https://tailwindcss.com/)
11+
[eslint](https://eslint.org/)
12+
[prettier](https://prettier.io/)
13+
[rollup](https://rollupjs.org/)
414

515
## Development
616

717
```bash
818
npm i
19+
# api and frontend
920
now dev
21+
# frontend only
22+
npm run dev
23+
24+
npm run test
25+
npm run lint
26+
npm run check
1027
```
1128

1229
## Deployment
1330

14-
Deployed to [now](https://zeit.co/foundationtraining/transform)
31+
Deployed to [now](https://zeit.co/littlemooon/littlebox)
1532

1633
```bash
1734
npm run deploy

api/monitor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ export default handler(async (req, res) => {
4242
const response = await fetch(url)
4343
const time = diffTime(fetchStart)
4444
if (isValidResponse(validStatuses, response)) {
45-
log.info('Success: %s %d %s', time, response.status, url)
45+
log.info('Pass: %d %s %s', response.status, url, time)
4646
return {
4747
url,
4848
time,
4949
success: true,
5050
status: response.status,
5151
}
5252
} else {
53-
log.warn('Failure: %s %d %s', time, response.status, url)
53+
log.warn('Fail: %d %s %s', response.status, url, time)
5454
return {
5555
url,
5656
time,
@@ -66,7 +66,7 @@ export default handler(async (req, res) => {
6666
log.error(error, 'Failed to fetch %s', url)
6767
return { url, time, success: false, error }
6868
}
69-
})
69+
}),
7070
)
7171

7272
res.status(200).json({

client/App.svelte

Lines changed: 0 additions & 12 deletions
This file was deleted.

client/Footer.svelte

Lines changed: 0 additions & 10 deletions
This file was deleted.

client/Header.svelte

Lines changed: 0 additions & 15 deletions
This file was deleted.

client/index.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { splitArray } from './lib/utils'
22

33
export default {
4+
dev: process.env.NODE_ENV === 'development',
5+
host: process.env.NOW_URL || `http://localhost:3000`,
46
token: process.env.API_TOKEN,
57
monitor: {
68
urls: splitArray(process.env.MONITOR_URLS),

cypress.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"baseUrl": "http://localhost:3000",
3+
"video": false
4+
}

0 commit comments

Comments
 (0)