To reproduce:
$ npm install
$ npm run tsc
# tsc emits all code to tsc-out as expected
$ npm run webpack
# Errors indicate that it can't find either .jsx files but it can find the .js files
#!/bin/bash -x | |
exec > /tmp/transcript.log 2>&1 | |
# This trick means the bash scripts logs its entire execution, | |
# both the commands executed and the output of those commands, | |
# to the transcript file. |
$headlessDataDir = "$( (Get-Location).Path )/headlessDataDir" | |
$devtoolsDataDir = "$( (Get-Location).Path )/devtoolsDataDir" | |
$remoteDebuggingPort = 9222 | |
$urlToInspect = https://www.example.com | |
# Open headless browser | |
& 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' "--user-data-dir=$headlessDataDir" --headless --remote-debugging-port=$remoteDebuggingPort $urlToInspect | |
# Open DevTools | |
& 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' "--user-data-dir=$devtoolsDataDir" "http://localhost:$remoteDebuggingPort" |
# Recipe for deleting old, merged branches from a remote repository | |
# delete stuff already merged into this branch... | |
$developBranch = 'develop' | |
# ...and whose most recent commit is older than this... | |
$ifOlderThan = [datetime]'06-01-2017' | |
# ...on this remote | |
$remote = 'origin' | |
# Get list of all remote branches already merged into develop |
import {unique} from 'lodash'; | |
import * as path from 'path'; | |
/* | |
* Grunt copy task that's faster by eliminating unnecessary or redundant fs calls. | |
* | |
* Things it does *not* do: | |
* - set or copy file mode / permissions | |
* - "process"ing files | |
* - "process"ing files as raw buffers |
To reproduce:
$ npm install
$ npm run tsc
# tsc emits all code to tsc-out as expected
$ npm run webpack
# Errors indicate that it can't find either .jsx files but it can find the .js files
#!/usr/bin/env bash | |
npm install stylus | |
# Dump all output into log.txt | |
exec > >(tee -i zlog.txt) | |
exec 2>&1 | |
### Bug reproduction: | |
echo ==================================================================================== |
"use strict"; | |
const stylus = require('stylus'); | |
const path = require('path'); | |
const fs = require('fs'); | |
if(['before', 'after'].indexOf(process.argv[2]) === -1) throw new Error('bad argument'); | |
const getDepsBeforeRender = process.argv[2] === 'before'; | |
const files = [ |
Sails and Trails current directory structures look like this:
/api/...
/config/...
/assets/...
The server executes code directly from the source code directory. It executes the same code files that are stored in version control.
When using compiled languages, we need to convert our TypeScript, CoffeeScript, ES2015, etc files to .js
. Naively, we might add a few .gitignore rules:
var oboe = require('oboe'); | |
var stream = require('stream'); | |
var Readable = stream.Readable; | |
var Writable = stream.Writable; | |
var readable = new Readable(); | |
readable._read = function() {}; | |
readable.push('{"some": "json"}{"more": [1, 2, 3], "json": true}{"final json object": 12345}{"stream continues...'); | |
readable.push(null); |
module.exports = function(grunt) { | |
// Store a reference to the template function constructor | |
var tmpl = grunt.template.fn; | |
grunt.initConfig({ | |
// support running "copy:dev:blog", "copy:dev:homepage" or "copy:dev:contactForm" | |
copy: { | |
dev: { | |
files: [tmpl(=> { // look ma, all Javascript! No code hiding in strings. |