root-config | The root config for polyglot microfrontends | Single Page Application library
kandi X-RAY | root-config Summary
kandi X-RAY | root-config Summary
This is an example microfrontend repo demonstrating how to use single-spa. You can see the code running at
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 root-config
root-config Key Features
root-config Examples and Code Snippets
Community Discussions
Trending Discussions on root-config
QUESTION
I have 3 TypeScript projects below:
- root-config
- parcel, let us call it
my-app
- in-browser utility module, let us call it
api
All the projects above were generated using the create-single-spa
command.
In the api/src/lomse-api.ts
file, I'm exporting the fetchPeople
module as shown below:
ANSWER
Answered 2021-Feb-28 at 00:03That error is a TypeScript error, not a JavaScript or single-spa error. Here are options for what you need to do:
- Publish your utility module to a registry (types are optional since TS can infer from the source, though types are better). Then install it into each other microfrontend's node_modules. Since it's a webpack external, the version in node_modules will only be used for typescript compilation but not for execution in the browser.
- You could publish only the types, whether as an individual package or together with other microfrontend's typings.
- Mock the utility module's types, as described here.
Source:
QUESTION
I've been experimenting with single-spa for a while, and understand the basics of the developer experience. Create a parcel, yarn start on a unique port, add the reference to the import map declaration, and so on. The challenge with this is that as my root-config accrues more and more modules managing ports and import-maps starts to get tedious. What I want is to publish these modules to a central repository and load them from there (e.g., http://someserver.com/repository/moduleA/myorg-modulea.js, etc.).
I was recently introduced to localstack and started thinking maybe a local S3 bucket would serve for this. I have a configuration where builds (yarn build) are automatically published to an s3 bucket running on localstack. But when I try to load the root config index.html from the bucket I get the following JS error:
...ANSWER
Answered 2020-Dec-10 at 19:21I had a similar issue that I got to work with http-server
by adding each child .js file to a sub-folder in the root-config directory and launching the web server at the root-config directory level.
QUESTION
I've created a few apps that follow the same pattern as the react-microfrontend projects listed on the Single-spa examples page. However, these examples are not using TypeScript.
I am receiving a TS error when App2 tries to import a function that exists in App1, because App2 is unable to find the typings for the App1 object. And this makes sense to me, since the importmap.json
that is referenced in the index.html
file of the root-config project only has a URL listed for the .js file of each microfrontend. I really don't want to add @ts-ignore statements everywhere, and I also don't want to do cross-app communication without being type safe.
An example of what I'm referring to:
This file in the Planets app references the Button component from the Styleguide app. I am unable to build this unless I place a @ts-ignore on the line before the import statement, because my Planets app cannot find the type declarations for Styleguide.
I am very new to import maps and SystemJS in general, so if anyone could point me in the right direction, I'd appreciate it. I've actually gone through the trouble of building my Styleguide as a regular npm library and just including it as a dependency in the Planets package.json file... which kind of defeats the whole purpose of using Single-spa in the first place.
importmap.json
...ANSWER
Answered 2020-Oct-30 at 17:45Unfortunately no, they cannot be shared via the import map because that operates in the browser, and browsers do not understand TypeScript syntax.
Your alternatives are:
- Publish your module's types to an npm registry and
npm install
it into each dependent microfrontend- One caveat here: you will need to update this with every new publish of the shared module, but that can be automated with various tools such as renovate
- Mock the utility module's types
More info can be found at this Github issue: https://github.com/single-spa/single-spa/issues/609#issuecomment-665132965
QUESTION
I am getting a Clang compiler error when compiling ROOT script:
~/root_install/include/ROOT/RStringView.hxx:32:4: error: redefinition of 'basic_string_view' as different kind of symbol using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;
/usr/include/c++/9/string_view:90:11: note: previous definition is here
class basic_string_view
This is the problematic code in ROOT library:
...ANSWER
Answered 2020-Sep-15 at 09:34ROOT can be compiled with clang++
(but not with clang
) using the following command:
clang++ file.C `root-config --cflags --libs`
This also works with the -std=c++20
flag.
QUESTION
Apparently, CERN's "Root" software is compatible (as of version 6.12) with C++17. However, I have been completely unable to get this to work with the newest version (6.20) and all previous questions I found on this topic are from a few years ago.
Does anyone with Root experience know if there is a particular compiler option to get it to work with C++17?
Examples of errors I get when trying to compile a trivial "Hello world" program:
- The following is (I think) due to the "TFile.h" header implicitly loading "TString.h":
ANSWER
Answered 2020-Jul-01 at 08:12You can use root only with the c++ standard with which your root version has been compiled. This is a known inconvenience and I believe the developers would be happy if/when they get this sorted out. The build configuration root-config --cflags
should set the appropriate c++ standard. This might very well be c++17 (it is for me)
QUESTION
I want to create a plot with a TF1 function in my C++ program. For compiling I use
g++ *.cpp $(root-config --cflags --glibs)
and that works just fine.
But when I do ./a.out
afterwars it just won't show me the canvas it created (it says in the shell that a canvas C1 was created).
I already tried using a dummy with cin >> dummy
but that doesn't work either
ANSWER
Answered 2019-Jul-03 at 14:33I created a tf1test.c
with the following content:
QUESTION
I have a structure as follows:
...ANSWER
Answered 2019-May-08 at 12:17try this:
QUESTION
I know there are some similar questions, here Invoking C compiler using Python subprocess command and subprocess, invoke C-program from within Python but I believe my question is in some sense different.
I need to compile a c++ program which uses some ROOT libraries so I need to add some flags and link some libraries for the compilation. Therefore my compilation line on the normal shell is:
...ANSWER
Answered 2019-Feb-23 at 00:19From the documentation:
If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself. That is to say, Popen does the equivalent of:
QUESTION
I'm using a Makefile for setting up the environment needed for mo code. I'm just learning about parallelizing and would appreciate your help.
...ANSWER
Answered 2018-Sep-18 at 08:00Ok, So I figured it out myself after playing around. In case anyone else is looking for the same thing the Makefile should look like:
QUESTION
I have a big problem to install rootpy
. When I try this command:
ANSWER
Answered 2017-Sep-21 at 18:56You should install libroot-bindings-python-dev
package
with
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install root-config
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