Skip to content

Instantly share code, notes, and snippets.

View rauschma's full-sized avatar

Axel Rauschmayer rauschma

View GitHub Profile
const spawn = require('child_process').spawn;
const pandocPath = process.env.PANDOC || 'pandoc';
let args = ['-f', from, '-t', to, '-o', 'output/' + outputFile, inputFile];
let pandoc = spawn(pandocPath, args);
let error = '';
pandoc.on('error', (err) => (throw new Error(err)));
@Rich-Harris
Rich-Harris / README.md
Last active July 28, 2017 13:24
Bare imports in manifest

A hastily-written strawman for how bare imports could be resolved in browsers — see this convo.

@OliverJAsh
OliverJAsh / gist:bcc676e381a06dbb3be0
Created October 28, 2014 11:34
webpack experiment and comparison against jspm

webpack: http://webpack.github.io/ jspm: http://jspm.io/

Nice introduction presentation: http://peerigon.github.io/presentations/2014-07-09-MNUG-webpack/

The watch seems intelligent in that it might be tracing the dependency graph. In my test case it seems to, at least. AMD and CommonJS modules are supported out of the box. In my test I was unable to get es6-loader working (see commit in link below).

Unlike jspm, it's not a registry. Instead it resolves dependencies from node_modules (i.e. npm) by default (like browserify), although according to this tutorial it's trivial to configure which directories the module resolver should read from.

@rauschma
rauschma / question.md
Last active April 8, 2018 02:25
JavaScript libraries and tools: what are the bare essentials?

Question: If a newcomer to JavaScript asked you for essential libraries and tools, what would you tell them? You don’t want to overwhelm them with too many suggestions!

Focus: language-related functionality (as opposed to browser-related functionality).

  • Libraries: including, say, Underscore.js and promises libraries, but excluding jQuery et al.
  • Tools: package managers, build tools, unit test tools, etc.
    • Less important: editors, IDEs. Rationale: it’s fairly obvious that you need them. There are other tools that people might not even know that they need.