Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jk-oster/lesson-2-solution
https://github.com/jk-oster/lesson-2-solution
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jk-oster/lesson-2-solution
- Owner: jk-oster
- Created: 2024-04-15T17:23:39.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-04-15T17:33:39.000Z (8 months ago)
- Last Synced: 2024-04-15T18:45:51.826Z (8 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to LESSON 2
You can find the instructions for the lesson here:
https://jkoster.notion.site/Modern-Web-Apps-4ed40df5dab64edcb95e666155e10abc## Local Development-Server
```shell
npx vite# or
npx @web/dev-server --node-resolve --open --watch
````In case you get a "running scripts is disabled on this system ... see _Execution_Policies ..." Error
```shell
# fix execution policy error on windows when trying to execute npm scripts
# Open Windows Powershell as Administrator and run the following command
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
```## SASS / SCSS
````shell
# Installing SASS compiler
npm install -D sass
# Running SASS compiler watching for changes
# sass --watch
sass --watch css/style.scss css/style.css# modern alternative using vite
# (does same thing automatically if a scss file is linked in the index.html)
npx vite
````## GIT - connect local git repository to GitHub
````shell
# Add a local git repository to github
git remote add origin
git add .
git commit -m "commit message"
git push origin main
````## ESlint installation and usage
````shell
# Create package.json file and project configuration
npm init# Create configuration and install packages for linting
npm init @eslint/config
# Running ESlint - check syntax, find problems, enforce code style of all JavaScript files
npx eslint "**/*.js" # detecting and linting errors as far as possible
npx eslint "**/*.js" --fix # actually fixing errors as far as possible
````## Build and minify project for production
````shell
# Run local development server with HMR and file watching (also compiles ".scss" files automatically)
npx vite# Minifying, compiling and bundling our application for deployment on live system
# Builds project per default from "." folder to "dist" folder, uses "index.html" as entry point
npx vite build
````