monorepo | A monorepo for my old NPM libraries | Blockchain library
kandi X-RAY | monorepo Summary
kandi X-RAY | monorepo Summary
A monorepo for my NPM libraries. Managed with repo-cooker library. Using Jest, eslint, prettier and TypeScript through babel 7. Semantically versioned and automatically released, following conventional-commits!.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of monorepo
monorepo Key Features
monorepo Examples and Code Snippets
Community Discussions
Trending Discussions on monorepo
QUESTION
I've been working on deploying a full-stack application via Google App Engine. If I try to let App Engine build from source, Google's buildpacks obviously doesn't know what to do with my Yarn workspace dependency URLs. So for the client, I just build locally and deploy the static asset. No problem. (This is a partial workaround for Deploying yarn workspace monorepo app with internal dependencies to Google App Engine and, more obliquely, How can I deploy to Google App Engine an app that depends on a yarn workspaces without publishing the packages to a npm registry?)
This is fine for a client, but I'm running into an issue deploying the back-end: evidently, the server should listen on the App Engine environment's PORT env var. The only way that I can think of to accomplish this is to deploy the source and allow it to be be built via Google App Engine; but, as I mentioned, this is incompatible with workspace dependency URLs. The node app still runs (and can even perform egress) if I build it locally before deploying to GAE, but because it is not listening on the PORT env var the server takes no requests. I don't want to have to publish the back-end's workspace-level deps.
I'm sure someone must have experience deploying a node app which depends on both Yarn workspace-level dependencies and production-env-scope env vars. Can you give me some direction?
...ANSWER
Answered 2021-Jun-08 at 15:05(Edit: it would be better to adopt the paradigm described by jonrsharpe in the comments above---that is, retrieve environment variables from the actual production environment (i.e. App Engine) instead of baking them into a build.)
I just had to listen on port 8081 (that is, build locally with PORT set to 8081 and then deploy the built server). Perhaps 8080 was taken up either the default service (the client, in my case) or perhaps by nginx. I'm not quite sure, but I'm moving on for now.
QUESTION
Is it possible to an Expo app example to load a module located in the parent folder AND to see changes in the example app when i rebuild the package (with tsc -w to rebuild on any saved files)? I precise that the module is not publish on npm yet.
I've already succeed to do that using monorepo architecture with yarn workspaces and expo-yarn-workspaces package. But what about the case when you don't want to publish your package like a monorepo?
For example, in this repo https://github.com/cuvent/react-native-vision-camera There is an example RN app in bare workflow and in its package.json there is no mention of the developed package (meaning that it's not installed like a normal dependency). But in the app src/App.tsx, the package is used like that :
...ANSWER
Answered 2021-May-28 at 20:54Finally, I've found something that works for me. You can find my config for metro if you want here: https://github.com/grean/react-native-metro-config-app-example With it, you can access the parent component from the expo app, modify it and immediately see the hot-reload changes. Create a file metro.config file in your expo root app directory with that code inside:
QUESTION
I have a Yarn monorepo (workspace) with 2 packages: backend (Node.js/TypeScript) and frontend (React/Typescript).
/package.json
(trimmed)
ANSWER
Answered 2021-May-27 at 06:22After a lot of trial and error, removing the quotes from the path
s seems to have fixed the problem. And the size of the cache have increased almost twice
QUESTION
We use Angular in a nx monorepo in which we have been using Capacitor 2.4 for half a year now. We only use the android platform as of now. Now, we need to upgrade to Capacitor 3.0. The app itself is running again, however, as soon as I use any Plugin I always get the following exception: ERROR Error: "Device" plugin is not implemented on android
This is the same for every Plugin I have tried to use. So, if I would use the Storage Plugin I would get the same exception only for "Storage". I have followed the Capacitor migration guide (https://capacitorjs.com/docs/v3/updating/3-0) in detail, but I can't figure out where I went wrong. In general, the app works now, as long as I have any code that uses a Capacitor Plugin commented out. The code using the Plugins did work before the upgrade.
As according to the migration guide, I added import '@capacitor/core';
at the main.ts file, although I also tried putting it in the app.module.ts but had no success there either. I have installed every plugin for the whole app (the root) and for the nx-capacitor app (the capacitor app added with @nxtend-capacitor) as suggested here https://nxtend.dev/docs/capacitor/getting-started/. I also have updated the capacitor cli, the capacitor core and the capacitor android version for both package.json files.
Furthermore, according to the android upgrading guide, I have also updated gradle and the android gradle plugin. I have also updated the Android variables accordingly.
I honestly do not have too much experience or in-depth knowledge of Capacitor and I am aware that Capacitor 3 is still in Beta as of this point. However, maybe someone has already stumbled upon this problem and found a solution. I am also not sure, if this problem could somehow be caused by using this monorepo approach with nx. Has someone had experience in upgrading Capacitor to 3.0 while using a Nx monorepo?
For reference, this is the current package.json for the capacitor app:
...ANSWER
Answered 2021-Apr-27 at 08:34Try removing android platform (IMPORTANT: backup your android directory before removing.)
and run:
QUESTION
It's possible to set the working directory for separate scripts:
...ANSWER
Answered 2021-May-17 at 13:47I guess that would mess things up in relation to predefined variables in ADO which are read-only - so I don't think it's possible.
You would be probably better off by checking sources to or copying things to the default working directory right away at the start of the pipeline.
QUESTION
How to detect which tests pytest need to run?
Up to now I run all tests in CI. This is slow.
Isn't there a way to automatically detect which tests need to run, and only execute a fraction of the whole test suite?
Background: I am reading the Google SE book and read about their gigantic monorepo and that their tool Blaze can detect which tests need to run. Sounds very cool.
...ANSWER
Answered 2021-May-05 at 12:39You can add @pytest.mark
to the tests
QUESTION
I'm using react-app-rewired & customize-cra to setup a multi-project monorepo with shared TypeScript code, without ejecting from create-react-app (the setup is described in this answer). The layout is like:
...ANSWER
Answered 2021-May-08 at 02:19The simple answer (from this thread) is that Heroku provides no proper way to run in a subdirectory. Any solution will be a hack, and those will vary depending on your project layout.
In my case, I got it working by putting a package.json in the root of the repo with:
QUESTION
In a lerna monorepo, babel is installed only at the root package level.
When running npm exec babel-node from root/packages/packageA
, it fails with:
npm ERR! could not determine executable to run
From the same directory, running npm run test
, where test is just set to babel-node
opens the babel-cli.
I.e. why can npm resolve the path to the root node_modules' bin when run as a script but cannot when run from the terminal directly?
EDIT:
I.e. https://github.com/bishonen/newproject/tree/master/packages/someapp
when running npm run test-babel, it will work from any of the 3 directories which contain a package.json. When running npm exec babel-node, it will only work from the root directory.
...ANSWER
Answered 2021-May-07 at 19:07Workspaces support for both npm run and npm exec would be supported in npm@7.7.0
or greater. See the details here
You can use the feature updating npm
QUESTION
So I want to create shared libs in my angular project. I have listed down below my two approaches, which both do their job, but I don't which is the better one, that I should implement.
#1 One Ui lib with X components inside ...ANSWER
Answered 2021-May-03 at 21:45If you have multiple components in one module, your final bundle will contain all of them, even if you use just a fraction of it.
If you create one module per component (or components that always are used together), your bundle size is more efficient but you end up having more boilerplate code.
The second approach is also the one that is followed by Angular Material.
When we are dealing with a UI lib which is part of an application, I don't see the need to have one module per component.
If you publish your UI library as "real npm library" like Material, it is a different story.
I would definitely not follow the second strategy for data-access
, util
and feature
libs. Those are usually designed for the specific needs of an application, i.e. you will need all of them and in that case less boilerplate counts more.
QUESTION
I'm using the code-first approach to GraphQL with NestJS and have a monorepo setup using Nx.
The schema.gql
is only produced when I run the server, which I can't do during CI. It's impractical for me to copy the whole repository into the docker image and start the server. The schema.gql
isn't generated when you build the nest application.
I've also looked at Generating the SDL manually doc on the NestJS website, but not really sure how to integrate that script.
Just wondering if someone has managed to generate the schema without starting the server?
...ANSWER
Answered 2021-Apr-29 at 00:01Managed to figure out how to integrate Generating the SDL manually.
Just executing the generate SDL function before you start your nest server will work.
Included a full sample below.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install monorepo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page