Use office-addin-dev-certs with react-scripts - ssl-certificate

We have been developing an office add-in with ReactJS. I have always been using sudo PORT=8000 HTTPS=true SSL_CRT_FILE=localhost.crt SSL_KEY_FILE=localhost.key ./node_modules/.bin/react-scripts start (see here) to test the add-in in development.
I just learned that https://github.com/OfficeDev/Office-Addin-Scripts/tree/master/packages/office-addin-dev-certs works well in development.
So does anyone know how to use office-addin-dev-certs in a project by react-scripts and create-react-app?

Related

VS Code does not launch a web browser when starting Live Server or "npm start" with React

I'm using Visual Studio Code Insiders on Arch Linux (installed via snapstore), and whenever I try to "open with live server", no browser launches. I can manually go to the local domain myself and its running, however it is annoying how it doesn't work out of the box. Same thing happens when using a react app, except it shows a link to follow in the integrated terminal.
It's not the biggest of deals, but it is annoying me because I do remember a time when Firefox was my default browser (fresh Arch install) and I was not having that problem.
Maybe I messed up something in the VS Code user settings but I cant remember... any tips to fix this hiccup would be much appreciated!
also the same thing happened with VS Code Insiders-git and bin from the AUR. Installing other versions and other repos didn't help.

Loss of developer ergonomics after packaging code as library

I have made a few applications (using webpack, babel, react, d3, npm etc.) that uses very similar charting code. I am in the process of splitting out that charting code into an npm package which multiple apps can then import.
To test this out, I've embedded a demo app inside my chart libraries project directory and install the library at its file path. Now, presumably i'll be able to install this in depending apps A, B and C and so on, and I can change my chart libary and all apps will reflect these changes.
The first thing I noticed is that I now have to cd into my chart library and run npm run build (which runs webpack) any time I change something, and then cd into the depending app I'm working on and run npm i. This can perhaps be improved by using npm link but there are issues there as well (such as versioning and deploying to my server). So my first question is about what a decent rapid development approach looks like now that my charting code is in a separate npm project.
The other problem I've noticed is that I've lost two valuable features with respect to my chart library code. Code completion in VSCode and debugging in chrome dev tools. I'm not sure why VSCode code completion has stopped working. And for debugging, how would i be able to debug both my depending app and the library its depending on at the same time in chrome?
I would use npm link. It's immensely helpful when working on a library and its integration side by side.
Check the Chrome settings to make sure it's not instructed to skip libraries in Settings -> Framework Blackboxing, see e.g., http://blog.edenhauser.com/tell-chrome-debugger-to-ignore-libraries/.

React JSPM testing framework

What is the best testing framework and its associated helper libraries to use for a project in React and JSPM? I'm looking for various libraries combined together and what is specific to that set which makes it a powerful toolset? (Looking to incorporate redux later on)
I recently build testing environment for a react application using JSPM.
I first wanted to use Jest, as it is recommended by the community with react. But then I found out that thread, saying support for JSPM/SystemJs wasn't on the roadmap at the moment.
Although it exists some work to make it work, see for example: https://www.npmjs.com/package/systemjs-jest
Then I chose to use Jasmine as it is quite known in my company, and I already worked with it.
Also I think Jest used to be based on Jasmine, so many react-specific matchers developed for Jest are also compatible with Jasmine.
So I ended up using Jasmine with Karma, using karma-jasmine and karma-uiuxengineering-jspm.
Make sure to read the documentation of karma-uiuxengineering-jspm thoroughly, it took me some time to set the environment up.
Some nice additions:
- jasmine-enzyme (installed with JSPM)
- karma-mocha-reporter (installed with npm)
- karma-phantomjs-launcher (installed with npm)

How to instal no flo on a mac to show the visual interface

Im trying to install and play with no flo. I have a Mac 10.9.5.
I have tried to follow the instructions as detailed in http://noflojs.org/documentation/. I've installed noflo, built the project and got the calculator to run. Lovely. However there's also the instructions here: http://noflojs.org/documentation/installation/ which I assume I don't have to do because its about installing from git and I've already got noflo installed. It has something confusing about grunt which I've never used before and which is confusing as you have to install grunt globally as well as locally for each subfolder. However I think I dont need to do this (correct me if I'm wrong) as I've already got no flo to work on the command line.
My question is: how do I get the visual interface with all the draggable components to work on my mac now that I've got noflo installed.
The visual IDE used for NoFlo is Flowhub. It is separate from NoFlo itself, because it can also be used with other FBP/data-flow runtimes.
Setup Flowhub for
NoFlo on node.js or NoFlo on browser

Install Mono Runtime Locally

Here is my situation. I am on a Mac using Brew as my package manager. I had mono installed on my machine and I was doing all sorts of development in C#. I was doing web development, gui development, ect. When I tried to update my machine using Brew, I got an error. Uninstalling Mono solved the issue.
So, what I did is I toyed around and I created a 2nd user on my machine. Now, this user doesn't need anything to work. I just need Mono and Mono Develop to work on this user without installing anything globally. Everything needs to be installed locally.
So to be specific, I am the only on who uses my machine. My /Users directory looks like this.
/Users/dillon
/Users/dummy
So if I could install mono, in let's say:
/Users/dummy/.mono
Then in my .profile:
export MONO_PATH=/Users/dummy/.mono
Obviously this isn't a perfect world but I was wondering if anyone is an expert on this subject?
(Also, I use this dummy user for other stuff, I use it for Wine and I have a collection of software from school on this user.)
You need to build Mono from source to install it into a custom location (in which case you can install it anywhere you like).
You can install MonoDevelop.app anywhere, but getting it to use your custom Mono is a bit trickier. You might be able to make it work by mucking around with the relevant environment variables though.
How to install Mono in a custom location and the relevant environment variables is all covered here: http://mono-project.com/Parallel_Mono_Environments