GithubHelp home page GithubHelp logo

next_yarn2's Introduction

Basic Yarn 2 Next.js Project

Packages used ->

  • base dependencies: yarn add next react react-dom
  • extra dependencies 'anything goes here, those can be removed': yarn add axios
  • devDependencies: yarn add --dev prettier typescript eslint@"<8.0.0" @yarnpkg/sdks @types/node @types/react eslint-config-next eslint-config-prettier eslint-plugin-prettier @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier typescript tailwindcss@latest postcss@latest autoprefixer@latest playwright jest

--Can be skipped--

This step could be skipped, since the project is initialised already

Setup with yarn 2:

  • make sure to first enable corepack(supported in node 16.10 and up) by running corepack enable; must be run in an admin console
  • run -> yarn init -2

--Can be skipped--

Install:

For prettier it is recommended to set it to format on save, and have it selected as a formatter in VSCode

To set the defaults, press CMD + SHIFT + P (on MacOS) or CTRL + Shift + P (on Windows), then type in preferences open settings(Preferences: Open Settings(JSON)) Then in the file add -> "editor.formatOnSave": true, Alternatively press CTRL + ,, then type format on save and tick the checkbox on Editor: Format on Save

Using commands

  • for the next ... commands check Next.js docs
  • prettier-format command should only be run in case your editor doesn't support formatting on save

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.