This commit is contained in:
parent
f8e7e73a0e
commit
4fbff4d412
5
ansi.md
5
ansi.md
|
@ -32,3 +32,8 @@ Colors
|
|||
5 magenta
|
||||
6 cyan
|
||||
7 white
|
||||
|
||||
Stuff
|
||||
|
||||
hide_cursor() { printf "\e[?25l"; }
|
||||
show_cursor() { printf "\e[?25h"; }
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
title: Setting up jscoverage
|
||||
layout: default
|
||||
---
|
||||
|
||||
### Install
|
||||
|
||||
npm i --save-dev jscoverage
|
||||
|
||||
### package.json
|
||||
|
||||
Set up the `coverage` task so you can do `npm run coverage` later.
|
||||
|
||||
"coverage": "./node_modules/.bin/jscoverage YOURFILE.js && env COVERAGE=true ./node_modules/.bin/mocha -R html-cov > coverage.html; rm YOURFILE-cov.js",
|
||||
|
||||
### test/setup.js
|
||||
|
||||
Instead of requiring `YOURFILE.js`, use `-cov.js` when it's necessary. It's
|
||||
preferred to do this in the test files (rather than the main entry points).
|
||||
|
||||
var cov = (!! process.env.COVERAGE);
|
||||
global.Mylib = require(cov ? 'mylib' : 'mylib-cov');
|
||||
|
||||
### Run
|
||||
|
||||
npm run coverage
|
||||
open coverage.html
|
8
sh.md
8
sh.md
|
@ -202,6 +202,14 @@ or
|
|||
;;
|
||||
esac
|
||||
|
||||
### Source relative
|
||||
|
||||
source "${0%/*}/../share/foo.sh"
|
||||
|
||||
### printf
|
||||
|
||||
printf "Hello %s, I'm %s" Sven Olga
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: Webpack
|
||||
layout: default
|
||||
---
|
||||
|
||||
### Config
|
||||
|
||||
* webpack.config.js
|
||||
|
||||
### Multiple entries
|
||||
|
||||
entry: {
|
||||
app: './app.js',
|
||||
vendor: './vendor.js'
|
||||
}
|
||||
|
||||
### Output
|
||||
|
||||
output: {
|
||||
path: __dirname + '/public/assets',
|
||||
filename: '[name].js'
|
||||
/* also: [id] [hash] */
|
||||
chunkFilename: "[id].chunk.js"
|
||||
}
|
Loading…
Reference in New Issue