Visitar URL original
borntofrappe (Gabriele Corti) · GitHub
The Wayback Machine - https://web.archive.org/web/20211002035830/https://github.com/borntofrappe
Skip to content
Avatar
🚀
HTML, CSS, JS, and SVG
🚀
HTML, CSS, JS, and SVG

Achievements

Achievements

Block or Report

Block or report borntofrappe

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
borntofrappe/README.md

borntofrappe

What's this? my personal website! There's bound to be a homepage and, fingers crossed, a blog too. Past that, I'm open to suggestions.

Development notes

Following the documentation with excessive detail.

Getting started

dated September 21st 2021

npm init svelte@next

Running the code prompts a series of questions to scaffold the project

  • Directory not empty. Continue? y

  • Which Svelte app template? Skeleton project

  • Use TypeScript? No

  • Add ESLint for code linting? Yes

  • Add Prettier for code formatting? Yes

The command line highlights a few steps to continue

  1. npm install

  2. optional commit (this is already a git & Github repository)

  3. npm run dev -- --open

The existing README.md is replaced with the documentation for create-svelte, but the markup is one Ctrl-Z key away. The documentation does provide a few helpful notes though:

  • to create a production version you need to first install an adapter. Afterwards:

    npm run build
  • to preview the built application:

    npm run preview

Up and running

dated September 22nd 2021

I intend to deploy the website through Netlify, and the relevant adapter is adapter-netlify.

npm i -D @sveltejs/adapter-netlify@next

From the Github repo, the relevant configuration happens in svelte.config.js.

Import:

import adapter from '@sveltejs/adapter-netlify';

Add the adapter to the field describing the kit:

export default {
	kit: {
		adapter: adapter(),
		target: '#svelte'
	}
};

The project's README highlights a couple of warnings, among which one describing the node version.

Netlify defaults to Node 12.16. SvelteKit requires Node v12.20 to build.

Among the proposed options, I decided to require a valid node version with a netlify.toml config file.

[context.production]
  environment = { NODE_VERSION = "14.16.0" }

The config file is also required to specify which command to run on build.

[build]
  command = "npm run build"
  publish = "build/"

With this setup, build:

npm run build

Preview:

npm run preview

Directing Netlify to the Github repo should then be enough to have the project live.

Pinned

  1. My personal website! Built with SvelteKit, deployed through Netlify. Hopefully soon.

    JavaScript 1 1

  2. A small website to tinker with Github Pages and a pixelated spritesheet.

    HTML

  3. The repository of an aspiring game developer, starting from CS50's Intro to Game Development and creating interactive demos. Lots and lots of demos.

    Lua 1

  4. Practice with Svelte.js with a series of applications.

    JavaScript 63 12

  5. A series of projects to learn about the D3 library

    JavaScript 1

  6. Recreate the visualization from [_Fullstack D3_](https://www.newline.co/fullstack-d3), an incredibly informative book from [_Amelia Wattenberger_](https://wattenberger.com/)

    JavaScript 5

1,837 contributions in the last year

Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Mon Wed Fri

Contribution activity

October 2021

Created 2 commits in 1 repository

Seeing something unexpected? Take a look at the GitHub profile guide.