├── static ├── global.css ├── favicon.ico ├── img │ ├── final-design.png │ ├── teacher-meme.jpg │ ├── initial-design.png │ └── logos │ │ ├── hero-patterns.svg │ │ ├── xstate.svg │ │ ├── svelte.svg │ │ ├── routify.svg │ │ ├── tailwindcss.svg │ │ └── render.svg ├── __index.html └── css │ └── prism-theme-nord.css ├── scripts ├── now │ ├── .gitignore │ ├── now.json │ ├── package.json │ ├── build.js │ └── api │ │ └── ssr.js └── netlify │ ├── .netlify │ └── state.json │ ├── .gitignore │ ├── api │ └── ssr │ │ ├── ssr.js │ │ └── package.json │ ├── netlify.toml │ ├── package.json │ └── build.js ├── src ├── components │ ├── how │ │ ├── Break.svelte │ │ ├── Paragraph.svelte │ │ ├── Link.svelte │ │ ├── Image.svelte │ │ ├── Highlight.svelte │ │ ├── BlogDetails.svelte │ │ ├── Visualizer.svelte │ │ ├── Callout.svelte │ │ ├── List.svelte │ │ ├── Section.svelte │ │ └── Heading.svelte │ └── machine │ │ ├── Background.svelte │ │ ├── Microwave.svelte │ │ ├── Display.svelte │ │ ├── Appropriation.svelte │ │ ├── OpenButton.svelte │ │ ├── PanelButton.svelte │ │ ├── Door.svelte │ │ └── Panel.svelte ├── main.js ├── App.svelte ├── assets │ └── svg │ │ └── link.svg ├── stores │ └── time.js ├── pages │ ├── _fallback.svelte │ ├── _layout.svelte │ ├── index.svelte │ ├── tech.svelte │ └── how.svelte ├── helpers.js ├── examples.js └── machine.js ├── .gitignore ├── .npmignore ├── sandbox.config.json ├── postcss.config.js ├── README.md ├── tailwind.config.js ├── package.json ├── rollup.config.js └── yarn.lock /static/global.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/now/.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | node_modules/ 3 | .now -------------------------------------------------------------------------------- /src/components/how/Break.svelte: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /dist/ 3 | .DS_Store 4 | **/.history 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | /export 3 | /dist 4 | .DS_Store 5 | .history -------------------------------------------------------------------------------- /sandbox.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "container": { 3 | "port": 5000 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [require('tailwindcss')], 3 | }; 4 | -------------------------------------------------------------------------------- /scripts/netlify/.netlify/state.json: -------------------------------------------------------------------------------- 1 | { 2 | "siteId": "faa35e1a-508d-46d7-ab6c-b94bc8650902" 3 | } -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parker-codes/finite-state-microwave/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Finite State Microwave 2 | 3 | Check out the [website](https://finite-state-microwave.onrender.com)! 4 | -------------------------------------------------------------------------------- /scripts/netlify/.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | node_modules/ 3 | api/ssr/bundle.json 4 | .netlify/functions 5 | package-lock.json -------------------------------------------------------------------------------- /static/img/final-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parker-codes/finite-state-microwave/HEAD/static/img/final-design.png -------------------------------------------------------------------------------- /static/img/teacher-meme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parker-codes/finite-state-microwave/HEAD/static/img/teacher-meme.jpg -------------------------------------------------------------------------------- /static/img/initial-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parker-codes/finite-state-microwave/HEAD/static/img/initial-design.png -------------------------------------------------------------------------------- /src/components/machine/Background.svelte: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import HMR from '@sveltech/routify/hmr' 2 | import App from './App.svelte'; 3 | 4 | const app = HMR(App, { target: document.body }, 'routify-app') 5 | 6 | export default app; 7 | -------------------------------------------------------------------------------- /src/components/how/Paragraph.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |

8 | 9 |

-------------------------------------------------------------------------------- /src/components/machine/Microwave.svelte: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /src/components/how/Link.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /scripts/now/now.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "routes": [ 4 | { 5 | "handle": "filesystem" 6 | }, 7 | { 8 | "src": "/.*", 9 | "dest": "/api/ssr.js" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /src/components/how/Image.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 |
-------------------------------------------------------------------------------- /src/components/how/Highlight.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 |
7 |
 8 |         
 9 |             {code}
10 |         
11 |     
12 |
-------------------------------------------------------------------------------- /src/App.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /scripts/now/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "echo \"dummy build\"", 4 | "build:app": "cd ../.. && npm run build", 5 | "deploy": "node build && npx now" 6 | }, 7 | "dependencies": { 8 | "@sveltech/ssr": "^0.0.9", 9 | "fs-extra": "^8.1.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /scripts/now/build.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra') 2 | const { execSync } = require('child_process'); 3 | 4 | if (!fs.pathExistsSync('../../dist')) { 5 | console.log('Building app...') 6 | execSync('npm run build:app', {stdio: 'inherit'}) 7 | } 8 | 9 | fs.removeSync('public') 10 | fs.copySync('../../dist', 'public') -------------------------------------------------------------------------------- /src/components/how/BlogDetails.svelte: -------------------------------------------------------------------------------- 1 |
2 |
3 | Parker McMullin 4 |
5 | 6 |

July 24th, 2020

7 | 8 |

15 - 20 minute read

9 |
-------------------------------------------------------------------------------- /src/components/machine/Display.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
{value}
7 |
8 | -------------------------------------------------------------------------------- /scripts/netlify/api/ssr/ssr.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const { ssr } = require('@sveltech/ssr') 3 | const { script, template } = require('./bundle.json') 4 | 5 | exports.handler = async (event, context) => { 6 | const body = await ssr(template, script, event.path) 7 | return { statusCode: 200, body: body + '\n' } 8 | } -------------------------------------------------------------------------------- /scripts/netlify/api/ssr/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ssr", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "ssr.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@sveltech/ssr": "0.0.9" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/components/machine/Appropriation.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | Made with by Parker McMullin 7 | (aka. @parker_codes) 8 |
-------------------------------------------------------------------------------- /scripts/netlify/netlify.toml: -------------------------------------------------------------------------------- 1 | 2 | [build] 3 | publish = "public/" 4 | functions = "api/" 5 | ignore = "git diff --quiet HEAD^ HEAD ../../" 6 | 7 | [[redirects]] 8 | # SSR and SPA 9 | from = "/*" 10 | to = "/.netlify/functions/ssr" 11 | status = 200 12 | 13 | # SPA only 14 | # from = "/*" 15 | # to = "/__app.html" 16 | # status = 200 -------------------------------------------------------------------------------- /scripts/netlify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "npm run build:app && npm run build:netlify", 4 | "build:app": "cd ../.. && npm i && npm run build", 5 | "build:netlify": "node build && cd api/ssr && npm i", 6 | "deploy": "npm run build:netlify && netlify deploy" 7 | }, 8 | "dependencies": { 9 | "fs-extra": "^8.1.0" 10 | } 11 | } -------------------------------------------------------------------------------- /src/components/how/Visualizer.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 |
9 |