diff --git a/CLAUDE.md b/CLAUDE.md index 6252da6..038786a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,7 @@ Code Crispies is an interactive CSS/Tailwind learning platform built with pure J ## Commands ```bash -npm start # Start dev server at http://localhost:1312 +npm start # Start dev server at http://localhost:1234 npm run build # Production build to dist/ npm run test # Run tests once npm run test.watch # Run tests in watch mode diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c207a79 --- /dev/null +++ b/Makefile @@ -0,0 +1,54 @@ +# Code Crispies - Interactive CSS Learning Platform + +.PHONY: help dev build test test-watch test-coverage format clean install deploy + +# Default port +PORT = 1234 + +help: + @echo "Code Crispies - Development Commands" + @echo "" + @echo "Development:" + @echo " make dev - Start dev server (port $(PORT))" + @echo " make build - Production build to dist/" + @echo "" + @echo "Testing:" + @echo " make test - Run tests once" + @echo " make test-watch - Run tests in watch mode" + @echo " make test-coverage - Run tests with coverage" + @echo "" + @echo "Other:" + @echo " make format - Format all source files" + @echo " make clean - Remove build artifacts" + @echo " make install - Install dependencies" + +# Development +dev: + npm start + +# Build +build: + npm run build + +# Testing +test: + npm run test + +test-watch: + npm run test.watch + +test-coverage: + npm run test.coverage + +# Formatting +format: + npm run format + npm run format.lessons + +# Clean +clean: + rm -rf dist/ node_modules/.vite/ + +# Install +install: + npm install diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..bb86bdc --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +{ + description = "Code Crispies - Interactive CSS/HTML/Tailwind learning platform"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + nodejs_20 + nodePackages.npm + gnumake + ]; + + shellHook = '' + echo "Code Crispies Development Environment" + echo "" + echo "Commands:" + echo " make dev - Start dev server (port 1234)" + echo " make build - Production build" + echo " make test - Run tests" + echo " make format - Format code" + echo "" + ''; + }; + } + ); +} diff --git a/vite.config.js b/vite.config.js index 6c3d620..23a2c56 100644 --- a/vite.config.js +++ b/vite.config.js @@ -10,11 +10,11 @@ export default defineConfig((env) => ({ sourcemap: true }, server: { - port: 1312, + port: 1234, open: false }, preview: { - port: 1312, + port: 1234, open: false } }));