-
Fork this repository,
-
Clone your forked copy of the project;
git clone https://github.com/<your_user_name>/www-v2.git
-
Change to the project directory;
cd www-v2
This is a TypeScript project that uses React. You'll just need _Node.js and npm installed on your development machine. Although, this is sufficient to run, build, and test the project as a whole, you might need some extra tools for other development tasks.
You'll need tsc (TypeScript Compiler) to manually compile .ts files. You'll need
ts-node (Node.js executable for TypeScript) to manually execute .ts scripts directly. Finally,
Once npm is installed, to install the above, run
npm i -g typescript
npm i -g ts-nodeNote: Users on Linux and MacOS are required to add a sudo before these commands.
Check installation using
node -v && npm -v && tsc -v && ts-node -vOutput should look like
v23.7.0
11.1.0
Version 5.7.3
v10.9.2After you are set-up, the steps you take depend on what you want to do:
-
Run a development server
-
To install all the dependencies (in
package.json), runnpm install
-
Run React scripts.
-
For unoptimized development serving, run
npm run dev
Visit
localhost:5173in a browser to view the web page served. -
For generating a generic production build, run
npm run build
-
For generating a production build under the subdirectory
/www-v2, runnpm run build
-
For serving the last production build (
distfolder), runnpm run preview
Visit
localhost:4173in a browser to view the web page served.
-
-
All code is just plain text, so it doesn't really matter what you use to edit them. However, using modern, feature-rich IDEs/text-editors like: Atom, Brackets, WebStorm, Sublime Text, Visual Studio Code, etc. makes life way easier. These come with a directory-tree explorer, and an integrated terminal, at the very least, while having support for plugins/extensions to expand their functionality.
Some (non-exhaustive) benefits of using these are syntax highlighting, warning/error annotations, formatting, auto-refactoring, tons of customizable keyboard shortcuts, etc.
Visual Studio Code (VSCode) is currently the most-popular code editor for reasons like being lightweight, cleaner, large marketplace of extensions, integrated source control features, debugger, remote explorer support, regular expression based find/replace, etc.
Recommended extensions for this project are Babel JavaScript, ESLint, Git Graph,GitLens, markdownlint, Prettier, Tailwind CSS IntelliSense, and SVG.
All that, however, shouldn't necessarily stop you from using Emacs, Nano, or Vim, if that's your poison :D. Happy coding!