Snippets

Col Wilson start a SvelteKit project

Created by Col Wilson last modified
# https://bhspitmonkey.github.io/AdjectiveAdjectiveAnimal/
# grab a project name

PROJ=WigglyTalentedBoar

cd ~/dev

npm init svelte@next $PROJ # answer the questions

cd $PROJ
npm i
git init && git add -A && git commit -m "Initial Commit"

pre-commit install
# .pre-commit-config.yaml
# ci:
#   autoupdate_schedule: quarterly

# default_stages: [commit]

# default_install_hook_types: [pre-commit, commit-msg]

# repos:
#   - repo: https://github.com/pre-commit/pre-commit-hooks
#     rev: v4.3.0
#     hooks:
#       - id: check-case-conflict
#       - id: check-symlinks
#       - id: check-yaml
#       - id: destroyed-symlinks
#       - id: end-of-file-fixer
#       - id: mixed-line-ending
#       - id: trailing-whitespace

#   - repo: https://github.com/pre-commit/mirrors-prettier
#     rev: v2.7.1
#     hooks:
#       - id: prettier
#         args: [--write] # edit files in-place
#         additional_dependencies:
#           - prettier
#           - prettier-plugin-svelte
#           - svelte

#   - repo: https://github.com/codespell-project/codespell
#     rev: v2.1.0
#     hooks:
#       - id: codespell
#         stages: [commit, commit-msg]
#         exclude: yarn.lock

#   - repo: https://github.com/pre-commit/mirrors-eslint
#     rev: v8.18.0
#     hooks:
#       - id: eslint
#         types: [file]
#         files: \.(svelte|js|ts)$
#         additional_dependencies:
#           - eslint
#           - svelte
#           - typescript
#           - eslint-plugin-svelte3
#           - '@typescript-eslint/eslint-plugin'
#           - '@typescript-eslint/parser'



# if netlify
npm i -D @sveltejs/adapter-netlify@next encoding
# import adapter from '@sveltejs/adapter-netlify';
# 	kit: {
# 		adapter: adapter(),
#
# netlify.toml
# [build]
#   command = "npm run build"
#   publish = "build"
#
# netlify link
# 
# ?fauna
# netlify addons:create fauna
#
# netlify addons:auth fauna

# if tailwind css
npx svelte-add@latest tailwindcss

npm i

# if daisyui
npm i -D daisyui
# tailwind.config.js
# 	plugins: [
#   	require('daisyui'),
#	]

# if sequelize 
npm install --save sequelize @types/sequelize dotenv

# if postgres 
npm install --save pg pg-hstore dotenv

# if sqlite3
npm install --save sqlite3 @types/sqlite3

code -n .
npm run dev

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.