### Starting Development Server with Nx Source: https://github.com/neo4j-labs/arrows.app/blob/main/DEVELOP.md This command starts the development server for the 'arrows-app' project. It allows developers to access the application locally, typically at http://localhost:4200/, and provides live reloading on source file changes. ```shell nx serve arrows-app ``` -------------------------------- ### Running arrows-ts Application Locally with Nx Source: https://github.com/neo4j-labs/arrows.app/blob/main/apps/arrows-ts/DEVELOP.md This command starts the development server for the 'arrows-ts' application, allowing local testing and development. It compiles the React application and serves it, typically with hot-reloading capabilities. ```Shell nx serve arrows-ts ``` -------------------------------- ### Initializing Google Analytics with gtag in JavaScript Source: https://github.com/neo4j-labs/arrows.app/blob/main/apps/arrows-app/public/index.html This snippet initializes the Google Analytics 'gtag' function and configures it with a specific tracking ID ('UA-1192232-34'). It ensures that the 'dataLayer' array is available before pushing arguments, which is standard practice for Google Analytics setup. This allows for tracking page views and other events. ```JavaScript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-1192232-34'); ``` -------------------------------- ### Building the Model Library with Nx Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/model/README.md This command compiles and builds the `model` library using the Nx build system. It prepares the library for distribution or further use within the project. ```Shell nx build model ``` -------------------------------- ### Building Nx Library for Arrows.app Selectors (Shell) Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/selectors/README.md This command compiles and bundles the `selectors` library using the Nx build system. It processes the source code, resolves dependencies, and prepares the library for deployment or integration into other applications. This step is essential before publishing or using the library in a production environment. ```Shell nx build selectors ``` -------------------------------- ### Generating Nx JavaScript Library for Arrows.app Selectors (Shell) Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/selectors/README.md This command initializes a new publishable JavaScript library named `selectors` within an Nx workspace. It configures the import path to `@neo4j-arrows/selectors`, making the library easily consumable by other modules in the `arrows.app` project. This is a foundational step for creating a new, modular component. ```Shell nx g @nx/js:library --publishable --importPath=@neo4j-arrows/selectors selectors ``` -------------------------------- ### Running Unit Tests for the Model Library with Nx Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/model/README.md This command executes the unit tests for the `model` library. It leverages Jest, the configured testing framework, to ensure the library's functionality is working as expected. ```Shell nx test model ``` -------------------------------- ### Building Nx Graphics Library (Shell) Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/graphics/README.md This command compiles and builds the `graphics` library within the Nx workspace. It processes the library's source code to produce the necessary output files, preparing it for distribution or integration. ```shell nx build graphics ``` -------------------------------- ### Generating a Publishable JavaScript Library with Nx Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/model/README.md This command generates a new publishable JavaScript library named `model` with the specified import path `@neo4j-arrows/model` using the Nx JavaScript plugin. It sets up the basic project structure for the library. ```Shell nx g @nx/js:library --publishable --importPath=@neo4j-arrows/model model ``` -------------------------------- ### Running Unit Tests for Nx Graphics Library (Shell) Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/graphics/README.md This command executes the unit tests for the `graphics` library using Jest, as configured by Nx. It verifies the functionality and correctness of the library's components to ensure stability and reliability. ```shell nx test graphics ``` -------------------------------- ### Running Unit Tests for Arrows.app Selectors (Shell) Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/selectors/README.md This command executes the unit tests for the `selectors` library, leveraging Jest as configured by Nx. It ensures the correctness and stability of the library's components by running automated tests. Regular execution of this command helps maintain code quality and prevent regressions during development. ```Shell nx test selectors ``` -------------------------------- ### Applying a Pull Request Patch using Curl and Git Source: https://github.com/neo4j-labs/arrows.app/blob/main/CONTRIBUTING.md This command downloads a patch file from a GitHub pull request URL using `curl` and then applies it to the local repository using `git am`. The `--ignore-whitespace` flag helps prevent issues with whitespace differences, making it useful for integrating complex pull requests with multiple commits while preserving the original author. ```Shell curl $PULL_REQUEST_URL.patch | git am --ignore-whitespace ``` -------------------------------- ### Generating Nx Graphics Library (Shell) Source: https://github.com/neo4j-labs/arrows.app/blob/main/libs/graphics/README.md This command generates a new publishable JavaScript library named `graphics` with the specified import path `@neo4j-arrows/graphics` using the Nx workspace generator. It sets up the foundational project structure for the library. ```shell nx g @nx/js:library --publishable --importPath=@neo4j-arrows/graphics graphics ``` -------------------------------- ### Visualizing Project Dependencies with Nx Source: https://github.com/neo4j-labs/arrows.app/blob/main/DEVELOP.md This command generates a visual diagram of the dependencies between projects within the Nx workspace. It helps in understanding the architecture and relationships between different applications and libraries. ```shell nx graph ``` -------------------------------- ### Enabling Remote Caching with Nx Cloud Source: https://github.com/neo4j-labs/arrows.app/blob/main/DEVELOP.md This command connects the Nx workspace to Nx Cloud, enabling remote caching. Remote caching significantly speeds up Continuous Integration (CI) pipelines by sharing build artifacts and computation results across different environments and team members. ```shell npx nx connect-to-nx-cloud ``` -------------------------------- ### Initializing Segment.io Analytics in JavaScript Source: https://github.com/neo4j-labs/arrows.app/blob/main/apps/arrows-ts/index.html This self-executing anonymous function initializes the Segment.io analytics library. It checks for duplicate snippet inclusion, defines various analytics methods, creates a factory for these methods, and loads the Segment.io analytics.min.js script using a specified write key ('xEYCEAHSiI0eDV3qC3i13U4Uku8MC3wM'). Finally, it triggers a page view event. ```JavaScript !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e