Usage:
$ npx jscodeshift -t https://gist.githubusercontent.com/novemberborn/c2cdc94020083a1cafe3f41e8276f983/raw/eaa64c55dfcda8006fc760054055372bb3109d1c/transform.js test.jsSee https://github.com/facebook/jscodeshift#usage-cli for further details.
Usage:
$ npx jscodeshift -t https://gist.githubusercontent.com/novemberborn/c2cdc94020083a1cafe3f41e8276f983/raw/eaa64c55dfcda8006fc760054055372bb3109d1c/transform.js test.jsSee https://github.com/facebook/jscodeshift#usage-cli for further details.
| { | |
| plugins: [ | |
| ['./plugin', {label: 'plugin'}], | |
| ['./plugin', {label: 'plugin'}, 'named'] | |
| ], | |
| overrides: [ | |
| { | |
| test: 'foo.js', | |
| extends: './extends.json5', | |
| plugins: [ |
The actual snapshot is saved in test.js.snap.
Generated by AVA.
Snapshot 1
This Gist documents how to obtain a Let's Encrypt certificate for use with CloudFlare origin servers. For background please see my article on CloudFlare and Origin Servers for the Rightfully Paranoid.
I'm assuming OpenSSL is installed on your machine. You're also going to need
Node.js 5.6.0 or above. We'll be using
wilee to obtain the certificate from
Let's Encrypt.
Assuming you received the certificate in DER form, saved to cert.der:
openssl x509 -inform der -in cert.der -out chain.pemAppend the content of
https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.pem.txt to
chain.pem.
Copy /System/Library/OpenSSL/openssl.cnf to a new file.
Add the following at the end:
[ req ]
req_extensions = v3_req
[ v3_req ]
# Extensions to add to a certificate request
Changes with .dev domains in
mind.
Create /etc/pf.anchors/dev, containing:
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
Install dnsmasq using Homebrew. Edit the dnsmasq.conf file (Homebrew will tell you where to put it) to contain:
address=/.dev/127.0.0.1
listen-address=127.0.0.1
Then make sure Dnsmasq is running (again follow Homebrew instructions).
Create the /etc/resolver/dev directory (using root) if it doesn't exist yet and create a resolver for .dev:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| set -e | |
| # Shell script to compute code coverage even after the Babel transforms have | |
| # been applied. | |
| # Clear previous coverage. | |
| rm -rf coverage | |
| # Generate test coverage based on however `npm test` performs the tests. |