All Projects → LayZeeDK → nx-tiny-app-project

LayZeeDK / nx-tiny-app-project

Licence: other
Tiny Angular application project in an Nx workspace.

Programming Languages

typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Projects that are alternatives of or similar to nx-tiny-app-project

nx-extend
Nx Workspaces builders and tools
Stars: ✭ 67 (+86.11%)
Mutual labels:  workspace, nx
Cat-Face-Detector-with-OpenCV-and-JavaFX
📹 A Small OpenCV (Open Source Computer Vision) Example, who has the ability to detect multiple cat faces at the same time 🐱
Stars: ✭ 24 (-33.33%)
Mutual labels:  workspace
raiseorlaunch
A run-or-raise-application-launcher for i3 window manager.
Stars: ✭ 35 (-2.78%)
Mutual labels:  workspace
memberhive
Relationship Management System for churches and organisations
Stars: ✭ 12 (-66.67%)
Mutual labels:  nx
bazel-nx-example
⚡ Example monorepo for Nest + Angular built with Bazel
Stars: ✭ 41 (+13.89%)
Mutual labels:  nx
workbench
A hierarchical environment manager for bash, written in bash.
Stars: ✭ 17 (-52.78%)
Mutual labels:  workspace
axon
Nx-powered Neural Networks
Stars: ✭ 1,170 (+3150%)
Mutual labels:  nx
nix-env-selector
Allows switch environment for Visual Studio Code using Nix Package Manager.
Stars: ✭ 154 (+327.78%)
Mutual labels:  workspace
sys-clk-Overlay
Editor for your sys-clk configuration using ovl-loader!
Stars: ✭ 53 (+47.22%)
Mutual labels:  nx
switch-cmake
CMake toolchain for Nintendo Switch homebrew development
Stars: ✭ 38 (+5.56%)
Mutual labels:  nx
binary-security-check
Analyzer of security features in executable binaries
Stars: ✭ 36 (+0%)
Mutual labels:  nx
app-starter
Angular mono-repo (Ionic/Capacitor/StencilJS/Web Component) app starter for supporting cross platform apps.
Stars: ✭ 75 (+108.33%)
Mutual labels:  nx
guezwhoz-zsh-theme
Minimalistic .zshrc config contains all of the settings required for comfortable terminal use ...
Stars: ✭ 30 (-16.67%)
Mutual labels:  workspace
nextjs-monorepo-example
Collection of monorepo tips & tricks
Stars: ✭ 874 (+2327.78%)
Mutual labels:  workspace
Standard-Toolkit
An update to Component factory's krypton toolkit to support .NET Framework 4.6.2 - 4.8.1 to .NET Core/.NET
Stars: ✭ 194 (+438.89%)
Mutual labels:  workspace
awesome-nx
An awesome list that curates the best Nrwl Nx tools, tutorials, articles and more.
Stars: ✭ 45 (+25%)
Mutual labels:  nx
geoserver-rest
Python library for management for geospatial data in GeoServer. The geoserver-rest docs is available here,
Stars: ✭ 119 (+230.56%)
Mutual labels:  workspace
nx-tools
Workspace for Nx Plugins.
Stars: ✭ 40 (+11.11%)
Mutual labels:  nx
matnbaz
📚 The source-code for matnbaz.net. A monorepo containing the back-end (NestJS/Prisma/Apollo), front-end (Next.js/Apollo) and some tooling.
Stars: ✭ 481 (+1236.11%)
Mutual labels:  nx
MagicBox
Organize your workspace, keep files optimized, prepare images for publishing
Stars: ✭ 65 (+80.56%)
Mutual labels:  workspace

Tiny Angular application project in an Nx workspace.

  1. npx create-nx-workspace workspace --cli=angular --preset=angular --appName=tiny-app --style=scss
  2. nx update @angular/cli @angular/core

Assets workspace library

  1. nx generate library assets --directory=shared --tags="scope:shared,type:assets" --style=scss
  2. Remove the architect targets (lint and test) of the shared-assets project in angular.json:
{
  "projects": {
    "shared-assets": {
      "architect": {}
    }
  }
}
  1. npx rimraf ./apps/tiny-app/src/assets ./libs/shared/assets/*.js ./libs/shared/assets/*.json ./libs/shared/assets/src/*.* ./libs/shared/assets/src/lib
  2. "# shared-assets" > ./libs/shared/assets/README.md
  3. npx mkdirp ./libs/shared/assets/src/assets/fonts ./libs/shared/assets/src/assets/icons ./libs/shared/assets/src/assets/images
"" > ./libs/shared/assets/src/assets/fonts/.gitkeep
"" > ./libs/shared/assets/src/assets/icons/.gitkeep
"" > ./libs/shared/assets/src/assets/images/.gitkeep
  1. mv ./apps/tiny-app/src/favicon.ico ./libs/shared/assets/src
  2. In the build architect target of the tiny-app project in angular.json, replace the assets option with these two entries:
{
  "projects": {
    "tiny-app": {
      "architect": {
        "build": {
          "options": {
            "assets": [
              {
                "glob": "favicon.ico",
                "input": "libs/shared/assets/src",
                "output": ""
              },
              {
                "glob": "**/*",
                "input": "libs/shared/assets/src/assets",
                "output": "assets"
              }
            ]
          }
        }
      }
    }
  }
}
  1. npx -p wget-improved nwget https://nx.dev/assets/images/nx-logo-white.svg -O ./libs/shared/assets/src/assets/images/nx-logo-white.svg
  2. In app.component.html, replace the src attribute of the logo image element with "/assets/images/nx-logo-white.svg".

Styles workspace library

  1. nx generate library styles --directory=shared --tags="scope:shared,type:styles" --style=scss
  2. Remove the architect targets (lint and test) of the shared-styles project in angular.json:
{
  "projects": {
    "shared-styles": {
      "architect": {}
    }
  }
}
  1. npx rimraf ./libs/shared/styles/*.js ./libs/shared/styles/*.json ./libs/shared/styles/src/*.* ./libs/shared/styles/src/lib/*.*
  2. "# shared-styles" > ./libs/shared/styles/README.md
  3. mv ./apps/tiny-app/src/styles.scss ./libs/shared/styles/src/lib/_global.scss
  4. "@import './lib/global';" > ./libs/shared/styles/src/index.scss
  5. In the build architect target of the tiny-app project in angular.json, replace the styles option with this entry:
{
  "projects": {
    "tiny-app": {
      "architect": {
        "build": {
          "options": {
            "styles": [
              "libs/shared/styles/src/index.scss"
            ]
          }
        }
      }
    }
  }
}

Environments workspace library

  1. nx generate library environments --directory=shared --tags="scope:shared,type:environments" --style=scss
  2. npx rimraf ./libs/shared/environments/src/lib/*.*
  3. mv ./apps/tiny-app/src/environments/*.* ./libs/shared/environments/src/lib
  4. "export * from './lib/environment';" > ./libs/shared/environments/src/index.ts
  5. npx rimraf ./apps/tiny-app/src/environments
  6. In the build architect target of the tiny-app project in angular.json, replace the fileReplacements option in the production configuration with this entry:
{
  "projects": {
    "tiny-app": {
      "architect": {
        "build": {
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "libs/shared/environments/src/lib/environment.ts",
                  "with": "libs/shared/environments/src/lib/environment.prod.ts"
                }
              ]
            }
          }
        }
      }
    }
  }
}
  1. In main.ts, replace the environment import statement with the following:
import { environment } from '@workspace/shared/environments';

Configure Nx workspace

  1. Add these two implicitDependencies entries to the tiny-app project in nx.json:
{
  "projects": {
    "tiny-app": {
      "implicitDependencies": [
        "shared-assets",
        "shared-styles"
      ]
    }
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].