Git Product home page Git Product logo

lesson-3's Introduction

Welcome to LESSON 2

You can find the instructions for the lesson here: https://jkoster.notion.site/Modern-Web-Apps-4ed40df5dab64edcb95e666155e10abc

Local Development-Server

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

# 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

# Installing SASS compiler
npm install -D sass
# Running SASS compiler watching for changes
# sass --watch <input file> <output file>
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

# Add a local git repository to github
git remote add origin <REMOTE-URL>
git add .
git commit -m "commit message"
git push origin main

ESlint installation and usage

# 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 / live system

# 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

lesson-3's People

Contributors

jk-oster avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.