Code Monkey home page Code Monkey logo

nx-practice's Introduction

Nx Monorepo

πŸ“¦ Nx practice repository


Nx λž€?

ν˜„μž¬ κ°€μž₯ λ§Žμ€ κΈ°λŠ₯을 μ œκ³΅ν•˜λŠ” λͺ¨λ…Έλ ˆν¬λ₯Ό μœ„ν•œ 도ꡬ
개발자 생산성 ν–₯상, CI μ„±λŠ₯ μ΅œμ ν™”, μ½”λ“œ ν’ˆμ§ˆ μœ μ§€λ₯Ό μœ„ν•œ 졜고 μˆ˜μ€€μ˜ 도ꡬ라고 μ†Œκ°œλ˜μ–΄ μžˆλ‹€.

μ˜€ν”ˆ μ†ŒμŠ€μ΄λ©΄μ„œ Nx CloudλΌλŠ” 유료 μƒν’ˆμ„ 톡해 원격 캐싱 및 λΆ„μ‚° νƒœμŠ€ν¬ μˆ˜ν–‰κ³Ό 같은 μˆ˜μ€€ 높은 κΈ°λŠ₯을 μ œκ³΅ν•˜κ³  μžˆλ‹€.


Nx μ£Όμš” κΈ°λŠ₯

Run Tasks

nxλŠ” 단일 μ›Œν¬μŠ€νŽ˜μ΄μŠ€ ν˜Ήμ€ 전체 μ›Œν¬μŠ€νŽ˜μ΄μŠ€λ“€μ— λŒ€ν•œ νƒœμŠ€ν¬ μˆ˜ν–‰ λͺ…λ Ήμ–΄λ₯Ό 가지고 μžˆλ‹€.

# Syntax
nx <target name> <project name> <option overrides>

# Example
nx test products --watch
  • nx build : 단일 μ›Œν¬μŠ€νŽ˜μ΄μŠ€ νƒœμŠ€ν¬ μ‹€ν–‰
    (ν•΄λ‹Ή μ›Œν¬μŠ€νŽ˜μ΄μŠ€μ—μ„œ build μ‹€ν–‰)
  • nx run-many -t build: 전체 μ›Œν¬μŠ€νŽ˜μ΄μŠ€λ“€μ— λŒ€ν•œ νƒœμŠ€ν¬ μ‹€ν–‰ (build μ‹€ν–‰)
    (전체 μ›Œν¬μŠ€νŽ˜μ΄μŠ€μ—μ„œ build μ‹€ν–‰)
  • nx run-many -t build test: 전체 μ›Œν¬μŠ€νŽ˜μ΄μŠ€λ“€μ— λŒ€ν•œ μ—¬λŸ¬ νƒœμŠ€ν¬ μ‹€ν–‰
    (전체 μ›Œν¬μŠ€νŽ˜μ΄μŠ€μ—μ„œ build와 test μ‹€ν–‰)

Cache Task Results

nxλŠ” 캐싱 κΈ°λŠ₯(둜컬 캐싱)을 μ œκ³΅ν•˜κ³  μžˆλ‹€.

  • νƒœμŠ€ν¬ μ‹€ν–‰ λͺ…λ Ήμ–΄λ₯Ό μ‹€ν–‰ν•˜λ©΄, μ—¬λŸ¬ λ°©μ‹μ˜ μ„€μ • νŒŒμΌλ‘œλΆ€ν„° 캐싱을 μ–΄λ–»κ²Œ ν•˜λŠ”μ§€ μ²΄ν¬ν•œλ‹€.
  • nx.json / project.json / packages.json 등을 μ΄μš©ν•΄μ„œ μ„€μ •ν•œλ‹€.

Use Remote Caching

둜컬 캐싱 이외에도 리λͺ¨νŠΈ 캐싱 κΈ°λŠ₯을 μ œκ³΅ν•œλ‹€.

# Nx Cloudλ₯Ό 톡해 μ‚¬μš©μ΄ κ°€λŠ₯ν•˜λ‹€.
nx connect-to-nx-cloud

Distribution Task Execution

μž‘μ—…μ„ λΆ„μ‚°ν•΄μ„œ μ‹€ν–‰ν•˜λŠ” κΈ°λŠ₯을 μ œκ³΅ν•œλ‹€.

λ ˆν¬μ§€ν† λ¦¬μ˜ 핡심이 μˆ˜μ •λ˜μ–΄ λͺ¨λ“  μž‘μ—…μ„ CIμ—μ„œ μ‹€ν–‰ν•΄μ•Ό ν•˜λŠ” 경우,
μ„±λŠ₯을 κ°œμ„ ν•  수 μžˆλŠ” μœ μΌν•œ 방법은 μ—μ΄μ „νŠΈ μž‘μ—…μ„ 더 μΆ”κ°€ν•˜κ³  μž‘μ—…μ„ 효율적으둜 λ³‘λ ¬ν™”ν•˜λŠ” 것뿐이닀.

# 1. Nx Cloud에 μ—°κ²°
nx connect-to-nx-cloud

# 2. CIμ—μ„œ DTEλ₯Ό ν™œμ„±ν™”ν•œλ‹€.
nx generate @nrwl/workspace:ci-workflow --ci=github

Explore the Graph

λͺ¨λ…Έλ ˆν¬ μ•ˆμ— μžˆλŠ” λͺ¨λ“  νŒ¨ν‚€μ§€ κ°„μ˜ μ˜μ‘΄μ„± κ·Έλž˜ν”„λ₯Ό μ‹œκ°μ μœΌλ‘œ λ³΄μ—¬μ£ΌλŠ” κΈ°λŠ₯을 μ œκ³΅ν•œλ‹€.

nx graph

Automate Updating Dependencies

μ‚¬μš©ν•˜λŠ” packages versions듀을 μ—…λ°μ΄νŠΈ λ˜λŠ” μ—¬λŸ¬ 가지 λ„κ΅¬λ“€μ˜ 섀정을 μ—…λ°μ΄νŠΈν•˜κ±°λ‚˜ 심지어 μ†ŒμŠ€μ½”λ“œλ„ λ§ˆμ΄κ·Έλ ˆμ΄μ…˜μ„ μžλ™μœΌλ‘œ μˆ˜ν–‰ν•΄ μ€€λ‹€.


Enforce Module Boundaries

λͺ¨λ“ˆμ˜ 경계λ₯Ό κ°•μ œ(?) ν•˜λŠ” κΈ°λŠ₯을 μ œκ³΅ν•œλ‹€.

  • μ½”λ“œ 뢄석을 μ‚¬μš©ν•˜μ—¬ ν”„λ‘œμ νŠΈκ°€ μ„œλ‘œμ˜ 잘 μ •μ˜λœ 곡용 APIμ—λ§Œ μ˜μ‘΄ν•  수 μžˆλ„λ‘ ν•œλ‹€.
  • ν”„λ‘œμ νŠΈκ°€ μ„œλ‘œ μ˜μ‘΄ν•  수 μžˆλŠ” 방식에 μ„ μ–Έμ μœΌλ‘œ μ œμ•½μ„ κ°€ν•  수 μžˆλ‹€.
  • Lint 섀정을 μ΄μš©ν•΄μ„œ μ„ μ–Έμ μœΌλ‘œ μ„€μ •ν•œ λ‚΄μš©μ„ λ°”νƒ•μœΌλ‘œ μ œμ•½μ„ κ°€ν•  수 μžˆλ‹€.

Integrate with Editors

Nx Console for VSCodeλΌλŠ” VSCode ν™•μž₯ ν”„λ‘œκ·Έλž¨μ„ μ œκ³΅ν•˜κ³  μžˆλ‹€.


Plugin Features

κ³΅ν†΅μ μœΌλ‘œ μ‚¬μš© κ°€λŠ₯ν•œ μ‹€ν–‰κΈ°λ‚˜ μ½”λ“œλ₯Ό 생성해 λ‚΄λŠ” 생성기λ₯Ό ν”ŒλŸ¬κ·ΈμΈμœΌλ‘œ μž‘μ„±ν•˜κ³  μ„œλ‘œ κ³΅μœ ν•  수 μžˆλ‹€.

nx-practice's People

Contributors

chan9yu avatar

Stargazers

 avatar

Watchers

 avatar  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.