(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
function Event(name){ | |
this.name = name; | |
this.callbacks = []; | |
} | |
Event.prototype.registerCallback = function(callback){ | |
this.callbacks.push(callback); | |
} | |
function Reactor(){ | |
this.events = {}; |
// flow-typed signature: 41c26b1157e954a0cd4ce3efa2131537 | |
// flow-typed version: <<STUB>>/tessel_v^2.0.0/flow_v0.75.0 | |
/** | |
* This is an autogenerated libdef stub for: | |
* | |
* 'tessel' | |
* | |
* Fill this stub out by replacing all the `any` types. | |
* |
const fs = require('fs'); | |
const server = require('http').createServer(); | |
server.on('request', (req, res) => { | |
/** | |
* We basically put the whole big.file (~400mb) content in memory before we write it | |
* out to the response object. This is very inefficient. | |
* memory used: ~430mb | |
*/ | |
// fs.readFile('./big.file', (err, data) => { |
$('#file').fileupload({ | |
url: 'rewards/postnotes', | |
singleFileUploads: true, | |
replaceFileInput: false, | |
fileInput: $('#file'), | |
type: 'POST', | |
autoUpload: false, | |
progressall: function (e, data) { | |
button.attr('disabled', 'disabled') | |
}, |
/** | |
* For more info on how to create snippets in VS Code, | |
* visit https://code.visualstudio.com/Docs/customization/userdefinedsnippets | |
*/ | |
{ | |
"API Documentation": { | |
"prefix": "apidocs", | |
"body": [ | |
"/**", | |
"* @api {${1:http-method}} ${2:url} ${3:description}", |
{ | |
"directory": "public/lib" | |
} |
{ | |
"bitwise": true, | |
"camelcase": true, | |
"curly": true, | |
"eqeqeq": true, | |
"es3": false, | |
"esversion": 6, | |
"forin": true, | |
"freeze": true, | |
"immed": true, |
{ | |
"excludeFiles": ["node_modules/**", "bower_components/**"], | |
"requireCurlyBraces": [ | |
"if", | |
"else", | |
"for", | |
"while", | |
"do", | |
"try", |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
##List of less common (however useful) NPM commands
######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
var path = require('path'); | |
var webpack = require('webpack'); | |
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin; | |
module.exports = { | |
devtool: 'source-map', | |
debug: true, | |
entry: { | |
'app': './src/app/main' | |
}, |