|
|
@ -16,11 +16,11 @@ function main(dest, filenames) { |
|
|
|
if (!dest) { |
|
|
|
throw new Error('no dest provided'); |
|
|
|
} |
|
|
|
filenames.map(function (filename) { |
|
|
|
filenames.map(function(filename) { |
|
|
|
var content = fs.readFileSync(filename).toString('utf8'); |
|
|
|
var codeSamples = content.match(CODE_SAMPLE); |
|
|
|
|
|
|
|
codeSamples.map(function (codeSample) { |
|
|
|
codeSamples.map(function(codeSample) { |
|
|
|
// Do a little jank preprocessing
|
|
|
|
codeSample = codeSample.replace('<!--', '//').replace(' -->', ''); |
|
|
|
var extracted = codeSample.match(PARTS); |
|
|
|