Coder Social home page Coder Social logo

krompaco / hotwired-aspnet Goto Github PK

View Code? Open in Web Editor NEW
32.0 4.0 1.0 1.47 MB

A Blazor SSR sample site with CLI setup for Tailwind CSS and Webpack for Hotwire with Turbo and Stimulus

C# 28.95% HTML 60.66% JavaScript 7.87% CSS 2.52%
aspnetcore hotwire hotwire-stimulus hotwire-turbo hotwired razor-pages tailwind-css

hotwired-aspnet's Introduction

krompaco/hotwired-aspnet

A Razor Pages sample site with CLI setup for Tailwind CSS and Webpack for Hotwire with Turbo and Stimulus.

The demo web site is built using an Action in this repo.

It's the basic GitHub Action to Azure App Service example plus these steps first for building the frontend files.

- name: Setup npm
  uses: actions/setup-node@v2
  with:
    node-version: 18.12.0
- run: npm ci
- run: npm run prodbuild

Getting started

Be in repository root and do:

npm ci
npm run dev

Or if you don't need any JS watched and built while working this will work faster:

npm run prodbuild
npm run dev:css

To build without watcher:

npm run prodbuild

I recommend doing npm run dev:css and then going to src/WebApp/ and starting dotnet project by using:

dotnet watch run

Material used:

This article is where the SignalR setup comes from: https://medium.com/@kpax/hotwired-asp-net-core-web-application-part-4-5ff84da54452

About Turbo Streams over Web Socket: I recommend using the SignalR way from main but in the branch archived/barebone-websocket there's a barebone Web Socket Proof-of-Concept as well.

An alternative dotnet project: https://www.nuget.org/packages/HotwireTurbo/

Roadmap

  • Maybe make NuGet package of Krompaco.AspNetCore.Hotwired.
  • XUnit tests for Krompaco.AspNetCore.Hotwired.
  • Make default styling to look like an Optimizely CMS admin page.

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.