Skip to content

add script for extracting code blocks - #589

Merged
jenweber merged 1 commit into
masterfrom
extract-code-script
Mar 27, 2019
Merged

jenweber merged 1 commit into
masterfrom
extract-code-script

Conversation

@mansona

@mansona mansona commented Mar 12, 2019

Copy link
Copy Markdown
Member

I don't know how useful this would be going forward but if we want to have it available we could think about merging this in some way 🤔 I think for now we should leave this PR open and decide what to do with it in a more general way later 👍

If anyone wants to use this script in another branch you can just run the following:

git checkout extract-code-script extractCode.js
npm i gfm-code-blocks

And then you can run:

node extractCode.js

and it will export all of the code samples into a code directory

@ghost

ghost commented Mar 12, 2019

Copy link
Copy Markdown

This would help addressing #579. I would use this to then pipe those files to eslint and PR in the interim before automating this entirely.

@ghost

ghost commented Mar 14, 2019

Copy link
Copy Markdown

I used this to programmatically verify consistent quotes in the JavaScript blocks and think it could work well to automate checking the coding style. It might be feasible to pass the code block to babel to check for syntax errors.

extract-code-script...efx:try-linting-blocks

@mansona
mansona force-pushed the extract-code-script branch from 137701b to b9faa11 Compare March 27, 2019 16:49
@mansona mansona changed the title [WIP] add script for extracting code blocks add script for extracting code blocks Mar 27, 2019
@jenweber
jenweber self-requested a review March 27, 2019 17:13
@jenweber
jenweber merged commit 39f7a0c into master Mar 27, 2019
@jenweber
jenweber deleted the extract-code-script branch March 27, 2019 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants