Giter Site home page Giter Site logo

thecodingwhale / nextjs-typescript-yarn-workspaces Goto Github PK

View Code? Open in Web Editor NEW

This project forked from th0th/nextjs-typescript-yarn-workspaces

1.0 1.0 0.0 320 KB

A simple example to help you get started with Next.js + typescript + yarn workspaces.

License: MIT License

JavaScript 22.38% TypeScript 71.00% CSS 6.63%

nextjs-typescript-yarn-workspaces's Introduction

Next.js (with typescript and yarn workspaces)

Next.js (with typescript and yarn workspaces)

A simple example to help you get started with Next.js + typescript + yarn workspaces.

Getting started

$ cd nextjs-typescript-yarn-workspaces
$ yarn install
$ yarn workspace @project/web-app dev

Renaming for your project

I named the example workspace packages @project/components and @project/web-app. You can safely rename it to @my-awesome-project/components or something like that.

Custom types

The @types directory is for your custom global types. Since each Next.js application has to own a tsconfig.json of its own, these types are also included in packages/web-app/tsconfig.json.

"Where should I add custom @types packages?"

Since multiple packages can use the same typings, and it is very unlikely for different packages to depend on different versions of those typings, @types packages should go into devDependencies of the base package.json.

Running

Development

  1. Install dependencies

    $ yarn
  2. Start the web-app next.js application

    $ yarn workspace @project/web-app dev

    Then the application should be accessible on http://localhost:3000.

Shameless plug

I am an indie hacker, and I am running two services that might useful for your business. Check them out :)

WebGazer

WebGazer

WebGazer is a monitoring service that checks your website, cron jobs, or scheduled tasks on a regular basis. It notifies you with instant alerts in case of a problem. That way, you have peace of mind about the status of your service without manually checking it.

PoeticMetric

PoeticMetric

PoeticMetric is a privacy-first, regulation-compliant, blazingly fast analytics tool.

No cookies or personal data collection. So you don't have to worry about cookie banners or GDPR, CCPA, and PECR.

License

Copyright © 2020, Gökhan Sarı. Released under the MIT License.

nextjs-typescript-yarn-workspaces's People

Contributors

th0th avatar

Stargazers

 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.