This commit is contained in:
Rico Sta. Cruz 2014-03-26 12:09:02 +08:00
parent f8e7e73a0e
commit 4fbff4d412
6 changed files with 67 additions and 0 deletions

2
Gemfile Normal file
View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages'

1
Readme.md Normal file
View File

@ -0,0 +1 @@
:)

View File

@ -32,3 +32,8 @@ Colors
5 magenta
6 cyan
7 white
Stuff
hide_cursor() { printf "\e[?25l"; }
show_cursor() { printf "\e[?25h"; }

27
jscoverage.md Normal file
View File

@ -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
View File

@ -202,6 +202,14 @@ or
;;
esac
### Source relative
source "${0%/*}/../share/foo.sh"
### printf
printf "Hello %s, I'm %s" Sven Olga
References
----------

24
webpack.md Normal file
View File

@ -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"
}