diff --git a/curriculum/getChallenges.js b/curriculum/getChallenges.js index 9e17716623..915d1db05c 100644 --- a/curriculum/getChallenges.js +++ b/curriculum/getChallenges.js @@ -2,7 +2,7 @@ const path = require('path'); const { findIndex, reduce, toString } = require('lodash'); const readDirP = require('readdirp'); const yaml = require('js-yaml'); -const { parseMD } = require('../tools/challenge-parser/mdx'); +const { parseMD } = require('../tools/challenge-parser/parser'); const fs = require('fs'); const util = require('util'); /* eslint-disable max-len */ diff --git a/lerna.json b/lerna.json index 0596a421b9..1af811f841 100644 --- a/lerna.json +++ b/lerna.json @@ -5,7 +5,7 @@ "client/plugins/*", "curriculum", "tools/challenge-parser", - "tools/challenge-parser/mdx", + "tools/challenge-parser/parser", "tools/scripts/seed", "tools/scripts/build", "tools/formatter", diff --git a/tools/challenge-md-parser/.npmignore b/tools/challenge-parser/.npmignore similarity index 100% rename from tools/challenge-md-parser/.npmignore rename to tools/challenge-parser/.npmignore diff --git a/tools/challenge-md-parser/__snapshots__/challengeSeed-to-data.test.js.snap b/tools/challenge-parser/__snapshots__/challengeSeed-to-data.test.js.snap similarity index 100% rename from tools/challenge-md-parser/__snapshots__/challengeSeed-to-data.test.js.snap rename to tools/challenge-parser/__snapshots__/challengeSeed-to-data.test.js.snap diff --git a/tools/challenge-md-parser/__snapshots__/frontmatter-to-data.test.js.snap b/tools/challenge-parser/__snapshots__/frontmatter-to-data.test.js.snap similarity index 100% rename from tools/challenge-md-parser/__snapshots__/frontmatter-to-data.test.js.snap rename to tools/challenge-parser/__snapshots__/frontmatter-to-data.test.js.snap diff --git a/tools/challenge-md-parser/__snapshots__/solution-to-data.test.js.snap b/tools/challenge-parser/__snapshots__/solution-to-data.test.js.snap similarity index 100% rename from tools/challenge-md-parser/__snapshots__/solution-to-data.test.js.snap rename to tools/challenge-parser/__snapshots__/solution-to-data.test.js.snap diff --git a/tools/challenge-md-parser/__snapshots__/tests-to-data.test.js.snap b/tools/challenge-parser/__snapshots__/tests-to-data.test.js.snap similarity index 100% rename from tools/challenge-md-parser/__snapshots__/tests-to-data.test.js.snap rename to tools/challenge-parser/__snapshots__/tests-to-data.test.js.snap diff --git a/tools/challenge-md-parser/__snapshots__/text-to-data.test.js.snap b/tools/challenge-parser/__snapshots__/text-to-data.test.js.snap similarity index 100% rename from tools/challenge-md-parser/__snapshots__/text-to-data.test.js.snap rename to tools/challenge-parser/__snapshots__/text-to-data.test.js.snap diff --git a/tools/challenge-md-parser/challengeSeed-to-data.js b/tools/challenge-parser/challengeSeed-to-data.js similarity index 100% rename from tools/challenge-md-parser/challengeSeed-to-data.js rename to tools/challenge-parser/challengeSeed-to-data.js diff --git a/tools/challenge-md-parser/challengeSeed-to-data.test.js b/tools/challenge-parser/challengeSeed-to-data.test.js similarity index 100% rename from tools/challenge-md-parser/challengeSeed-to-data.test.js rename to tools/challenge-parser/challengeSeed-to-data.test.js diff --git a/tools/challenge-md-parser/fixtures/adjacent-tags-ast.json b/tools/challenge-parser/fixtures/adjacent-tags-ast.json similarity index 100% rename from tools/challenge-md-parser/fixtures/adjacent-tags-ast.json rename to tools/challenge-parser/fixtures/adjacent-tags-ast.json diff --git a/tools/challenge-md-parser/fixtures/challenge-html-ast.json b/tools/challenge-parser/fixtures/challenge-html-ast.json similarity index 100% rename from tools/challenge-md-parser/fixtures/challenge-html-ast.json rename to tools/challenge-parser/fixtures/challenge-html-ast.json diff --git a/tools/challenge-md-parser/fixtures/challenge-md-ast.json b/tools/challenge-parser/fixtures/challenge-md-ast.json similarity index 100% rename from tools/challenge-md-parser/fixtures/challenge-md-ast.json rename to tools/challenge-parser/fixtures/challenge-md-ast.json diff --git a/tools/challenge-md-parser/fixtures/video-challenge-md-ast.json b/tools/challenge-parser/fixtures/video-challenge-md-ast.json similarity index 100% rename from tools/challenge-md-parser/fixtures/video-challenge-md-ast.json rename to tools/challenge-parser/fixtures/video-challenge-md-ast.json diff --git a/tools/challenge-md-parser/frontmatter-to-data.js b/tools/challenge-parser/frontmatter-to-data.js similarity index 100% rename from tools/challenge-md-parser/frontmatter-to-data.js rename to tools/challenge-parser/frontmatter-to-data.js diff --git a/tools/challenge-md-parser/frontmatter-to-data.test.js b/tools/challenge-parser/frontmatter-to-data.test.js similarity index 100% rename from tools/challenge-md-parser/frontmatter-to-data.test.js rename to tools/challenge-parser/frontmatter-to-data.test.js diff --git a/tools/challenge-md-parser/index.js b/tools/challenge-parser/index.js similarity index 100% rename from tools/challenge-md-parser/index.js rename to tools/challenge-parser/index.js diff --git a/tools/challenge-md-parser/package-lock.json b/tools/challenge-parser/package-lock.json similarity index 100% rename from tools/challenge-md-parser/package-lock.json rename to tools/challenge-parser/package-lock.json diff --git a/tools/challenge-md-parser/package.json b/tools/challenge-parser/package.json similarity index 100% rename from tools/challenge-md-parser/package.json rename to tools/challenge-parser/package.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-adjacent-keys.json b/tools/challenge-parser/parser/__fixtures__/ast-adjacent-keys.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-adjacent-keys.json rename to tools/challenge-parser/parser/__fixtures__/ast-adjacent-keys.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-before-after.json b/tools/challenge-parser/parser/__fixtures__/ast-before-after.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-before-after.json rename to tools/challenge-parser/parser/__fixtures__/ast-before-after.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-broken-hints.json b/tools/challenge-parser/parser/__fixtures__/ast-broken-hints.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-broken-hints.json rename to tools/challenge-parser/parser/__fixtures__/ast-broken-hints.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-c-code.json b/tools/challenge-parser/parser/__fixtures__/ast-c-code.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-c-code.json rename to tools/challenge-parser/parser/__fixtures__/ast-c-code.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-double-marker.json b/tools/challenge-parser/parser/__fixtures__/ast-double-marker.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-double-marker.json rename to tools/challenge-parser/parser/__fixtures__/ast-double-marker.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-empty-after.json b/tools/challenge-parser/parser/__fixtures__/ast-empty-after.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-empty-after.json rename to tools/challenge-parser/parser/__fixtures__/ast-empty-after.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-empty-before.json b/tools/challenge-parser/parser/__fixtures__/ast-empty-before.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-empty-before.json rename to tools/challenge-parser/parser/__fixtures__/ast-empty-before.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-empty-contents.json b/tools/challenge-parser/parser/__fixtures__/ast-empty-contents.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-empty-contents.json rename to tools/challenge-parser/parser/__fixtures__/ast-empty-contents.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-empty-css.json b/tools/challenge-parser/parser/__fixtures__/ast-empty-css.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-empty-css.json rename to tools/challenge-parser/parser/__fixtures__/ast-empty-css.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-empty-html.json b/tools/challenge-parser/parser/__fixtures__/ast-empty-html.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-empty-html.json rename to tools/challenge-parser/parser/__fixtures__/ast-empty-html.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-erm-in-solution.json b/tools/challenge-parser/parser/__fixtures__/ast-erm-in-solution.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-erm-in-solution.json rename to tools/challenge-parser/parser/__fixtures__/ast-erm-in-solution.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-exploded-marker.json b/tools/challenge-parser/parser/__fixtures__/ast-exploded-marker.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-exploded-marker.json rename to tools/challenge-parser/parser/__fixtures__/ast-exploded-marker.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-extra-heading.json b/tools/challenge-parser/parser/__fixtures__/ast-extra-heading.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-extra-heading.json rename to tools/challenge-parser/parser/__fixtures__/ast-extra-heading.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-gfm.json b/tools/challenge-parser/parser/__fixtures__/ast-gfm.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-gfm.json rename to tools/challenge-parser/parser/__fixtures__/ast-gfm.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-imports-two.json b/tools/challenge-parser/parser/__fixtures__/ast-imports-two.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-imports-two.json rename to tools/challenge-parser/parser/__fixtures__/ast-imports-two.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-imports.json b/tools/challenge-parser/parser/__fixtures__/ast-imports.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-imports.json rename to tools/challenge-parser/parser/__fixtures__/ast-imports.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-incorrect-markers.json b/tools/challenge-parser/parser/__fixtures__/ast-incorrect-markers.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-incorrect-markers.json rename to tools/challenge-parser/parser/__fixtures__/ast-incorrect-markers.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-jsx-seed.json b/tools/challenge-parser/parser/__fixtures__/ast-jsx-seed.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-jsx-seed.json rename to tools/challenge-parser/parser/__fixtures__/ast-jsx-seed.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-marker-imports.json b/tools/challenge-parser/parser/__fixtures__/ast-marker-imports.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-marker-imports.json rename to tools/challenge-parser/parser/__fixtures__/ast-marker-imports.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-md-in-html.json b/tools/challenge-parser/parser/__fixtures__/ast-md-in-html.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-md-in-html.json rename to tools/challenge-parser/parser/__fixtures__/ast-md-in-html.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-multiple-solutions.json b/tools/challenge-parser/parser/__fixtures__/ast-multiple-solutions.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-multiple-solutions.json rename to tools/challenge-parser/parser/__fixtures__/ast-multiple-solutions.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-orphan-key.json b/tools/challenge-parser/parser/__fixtures__/ast-orphan-key.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-orphan-key.json rename to tools/challenge-parser/parser/__fixtures__/ast-orphan-key.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-realistic.json b/tools/challenge-parser/parser/__fixtures__/ast-realistic.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-realistic.json rename to tools/challenge-parser/parser/__fixtures__/ast-realistic.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-seed-keys.json b/tools/challenge-parser/parser/__fixtures__/ast-seed-keys.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-seed-keys.json rename to tools/challenge-parser/parser/__fixtures__/ast-seed-keys.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-simple.json b/tools/challenge-parser/parser/__fixtures__/ast-simple.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-simple.json rename to tools/challenge-parser/parser/__fixtures__/ast-simple.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-video-challenge.json b/tools/challenge-parser/parser/__fixtures__/ast-video-challenge.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-video-challenge.json rename to tools/challenge-parser/parser/__fixtures__/ast-video-challenge.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-video-out-of-order.json b/tools/challenge-parser/parser/__fixtures__/ast-video-out-of-order.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-video-out-of-order.json rename to tools/challenge-parser/parser/__fixtures__/ast-video-out-of-order.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-with-extra-lines.json b/tools/challenge-parser/parser/__fixtures__/ast-with-extra-lines.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-with-extra-lines.json rename to tools/challenge-parser/parser/__fixtures__/ast-with-extra-lines.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-with-jsx.json b/tools/challenge-parser/parser/__fixtures__/ast-with-jsx.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-with-jsx.json rename to tools/challenge-parser/parser/__fixtures__/ast-with-jsx.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-with-markers.json b/tools/challenge-parser/parser/__fixtures__/ast-with-markers.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-with-markers.json rename to tools/challenge-parser/parser/__fixtures__/ast-with-markers.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/ast-yaml-challenge.json b/tools/challenge-parser/parser/__fixtures__/ast-yaml-challenge.json similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/ast-yaml-challenge.json rename to tools/challenge-parser/parser/__fixtures__/ast-yaml-challenge.json diff --git a/tools/challenge-md-parser/mdx/__fixtures__/document-two.md b/tools/challenge-parser/parser/__fixtures__/document-two.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/document-two.md rename to tools/challenge-parser/parser/__fixtures__/document-two.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/document.md b/tools/challenge-parser/parser/__fixtures__/document.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/document.md rename to tools/challenge-parser/parser/__fixtures__/document.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/incorrect-path/with-imports.md b/tools/challenge-parser/parser/__fixtures__/incorrect-path/with-imports.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/incorrect-path/with-imports.md rename to tools/challenge-parser/parser/__fixtures__/incorrect-path/with-imports.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/realistic.md b/tools/challenge-parser/parser/__fixtures__/realistic.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/realistic.md rename to tools/challenge-parser/parser/__fixtures__/realistic.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/script-two.md b/tools/challenge-parser/parser/__fixtures__/script-two.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/script-two.md rename to tools/challenge-parser/parser/__fixtures__/script-two.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/script-with-markers.md b/tools/challenge-parser/parser/__fixtures__/script-with-markers.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/script-with-markers.md rename to tools/challenge-parser/parser/__fixtures__/script-with-markers.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/script.md b/tools/challenge-parser/parser/__fixtures__/script.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/script.md rename to tools/challenge-parser/parser/__fixtures__/script.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/simple.md b/tools/challenge-parser/parser/__fixtures__/simple.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/simple.md rename to tools/challenge-parser/parser/__fixtures__/simple.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-before-and-after.md b/tools/challenge-parser/parser/__fixtures__/with-before-and-after.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-before-and-after.md rename to tools/challenge-parser/parser/__fixtures__/with-before-and-after.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-broken-hints.md b/tools/challenge-parser/parser/__fixtures__/with-broken-hints.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-broken-hints.md rename to tools/challenge-parser/parser/__fixtures__/with-broken-hints.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-c-code.md b/tools/challenge-parser/parser/__fixtures__/with-c-code.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-c-code.md rename to tools/challenge-parser/parser/__fixtures__/with-c-code.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-editable-markers.md b/tools/challenge-parser/parser/__fixtures__/with-editable-markers.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-editable-markers.md rename to tools/challenge-parser/parser/__fixtures__/with-editable-markers.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-erm-in-solution.md b/tools/challenge-parser/parser/__fixtures__/with-erm-in-solution.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-erm-in-solution.md rename to tools/challenge-parser/parser/__fixtures__/with-erm-in-solution.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-frontmatter.md b/tools/challenge-parser/parser/__fixtures__/with-frontmatter.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-frontmatter.md rename to tools/challenge-parser/parser/__fixtures__/with-frontmatter.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-gfm.md b/tools/challenge-parser/parser/__fixtures__/with-gfm.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-gfm.md rename to tools/challenge-parser/parser/__fixtures__/with-gfm.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-imports-two.md b/tools/challenge-parser/parser/__fixtures__/with-imports-two.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-imports-two.md rename to tools/challenge-parser/parser/__fixtures__/with-imports-two.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-imports.md b/tools/challenge-parser/parser/__fixtures__/with-imports.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-imports.md rename to tools/challenge-parser/parser/__fixtures__/with-imports.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-marker-imports.md b/tools/challenge-parser/parser/__fixtures__/with-marker-imports.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-marker-imports.md rename to tools/challenge-parser/parser/__fixtures__/with-marker-imports.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-md-in-html.md b/tools/challenge-parser/parser/__fixtures__/with-md-in-html.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-md-in-html.md rename to tools/challenge-parser/parser/__fixtures__/with-md-in-html.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-missing-seed-contents.md b/tools/challenge-parser/parser/__fixtures__/with-missing-seed-contents.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-missing-seed-contents.md rename to tools/challenge-parser/parser/__fixtures__/with-missing-seed-contents.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-multiple-solns.md b/tools/challenge-parser/parser/__fixtures__/with-multiple-solns.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-multiple-solns.md rename to tools/challenge-parser/parser/__fixtures__/with-multiple-solns.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys-adjacent.md b/tools/challenge-parser/parser/__fixtures__/with-seed-keys-adjacent.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys-adjacent.md rename to tools/challenge-parser/parser/__fixtures__/with-seed-keys-adjacent.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys-extra-lines.md b/tools/challenge-parser/parser/__fixtures__/with-seed-keys-extra-lines.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys-extra-lines.md rename to tools/challenge-parser/parser/__fixtures__/with-seed-keys-extra-lines.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys-orphan.md b/tools/challenge-parser/parser/__fixtures__/with-seed-keys-orphan.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys-orphan.md rename to tools/challenge-parser/parser/__fixtures__/with-seed-keys-orphan.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys.md b/tools/challenge-parser/parser/__fixtures__/with-seed-keys.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-seed-keys.md rename to tools/challenge-parser/parser/__fixtures__/with-seed-keys.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-video-question-out-of-order.md b/tools/challenge-parser/parser/__fixtures__/with-video-question-out-of-order.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-video-question-out-of-order.md rename to tools/challenge-parser/parser/__fixtures__/with-video-question-out-of-order.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-video-question.md b/tools/challenge-parser/parser/__fixtures__/with-video-question.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-video-question.md rename to tools/challenge-parser/parser/__fixtures__/with-video-question.md diff --git a/tools/challenge-md-parser/mdx/__fixtures__/with-yaml.md b/tools/challenge-parser/parser/__fixtures__/with-yaml.md similarity index 100% rename from tools/challenge-md-parser/mdx/__fixtures__/with-yaml.md rename to tools/challenge-parser/parser/__fixtures__/with-yaml.md diff --git a/tools/challenge-md-parser/mdx/__snapshots__/index.acceptance.test.js.snap b/tools/challenge-parser/parser/__snapshots__/index.acceptance.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/__snapshots__/index.acceptance.test.js.snap rename to tools/challenge-parser/parser/__snapshots__/index.acceptance.test.js.snap diff --git a/tools/challenge-md-parser/mdx/index.acceptance.test.js b/tools/challenge-parser/parser/index.acceptance.test.js similarity index 97% rename from tools/challenge-md-parser/mdx/index.acceptance.test.js rename to tools/challenge-parser/parser/index.acceptance.test.js index f9ad354ccb..38b76a0fb8 100644 --- a/tools/challenge-md-parser/mdx/index.acceptance.test.js +++ b/tools/challenge-parser/parser/index.acceptance.test.js @@ -2,7 +2,7 @@ const path = require('path'); -const { parseMD } = require('./'); +const { parseMD } = require('.'); describe('challenge parser', () => { it('should parse a simple md file', async () => { diff --git a/tools/challenge-md-parser/mdx/index.js b/tools/challenge-parser/parser/index.js similarity index 100% rename from tools/challenge-md-parser/mdx/index.js rename to tools/challenge-parser/parser/index.js diff --git a/tools/challenge-md-parser/mdx/package-lock.json b/tools/challenge-parser/parser/package-lock.json similarity index 100% rename from tools/challenge-md-parser/mdx/package-lock.json rename to tools/challenge-parser/parser/package-lock.json diff --git a/tools/challenge-md-parser/mdx/package.json b/tools/challenge-parser/parser/package.json similarity index 97% rename from tools/challenge-md-parser/mdx/package.json rename to tools/challenge-parser/parser/package.json index 4d96263fd4..4b86c55bed 100644 --- a/tools/challenge-md-parser/mdx/package.json +++ b/tools/challenge-parser/parser/package.json @@ -1,5 +1,5 @@ { - "name": "challenge-mdx-parser", + "name": "challenge-parser", "version": "0.0.1", "description": "converts mdx files to challenge objects", "main": "index.js", diff --git a/tools/challenge-md-parser/mdx/plugins/__snapshots__/add-frontmatter.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-frontmatter.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/__snapshots__/add-frontmatter.test.js.snap rename to tools/challenge-parser/parser/plugins/__snapshots__/add-frontmatter.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/__snapshots__/add-seed.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-seed.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/__snapshots__/add-seed.test.js.snap rename to tools/challenge-parser/parser/plugins/__snapshots__/add-seed.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/__snapshots__/add-solution.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-solution.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/__snapshots__/add-solution.test.js.snap rename to tools/challenge-parser/parser/plugins/__snapshots__/add-solution.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/__snapshots__/add-tests.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-tests.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/__snapshots__/add-tests.test.js.snap rename to tools/challenge-parser/parser/plugins/__snapshots__/add-tests.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/__snapshots__/add-text.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-text.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/__snapshots__/add-text.test.js.snap rename to tools/challenge-parser/parser/plugins/__snapshots__/add-text.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/__snapshots__/add-video-question.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-video-question.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/__snapshots__/add-video-question.test.js.snap rename to tools/challenge-parser/parser/plugins/__snapshots__/add-video-question.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/__snapshots__/replace-imports.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/replace-imports.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/__snapshots__/replace-imports.test.js.snap rename to tools/challenge-parser/parser/plugins/__snapshots__/replace-imports.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/add-frontmatter.js b/tools/challenge-parser/parser/plugins/add-frontmatter.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-frontmatter.js rename to tools/challenge-parser/parser/plugins/add-frontmatter.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-frontmatter.test.js b/tools/challenge-parser/parser/plugins/add-frontmatter.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-frontmatter.test.js rename to tools/challenge-parser/parser/plugins/add-frontmatter.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-ids.js b/tools/challenge-parser/parser/plugins/add-ids.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-ids.js rename to tools/challenge-parser/parser/plugins/add-ids.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-seed.js b/tools/challenge-parser/parser/plugins/add-seed.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-seed.js rename to tools/challenge-parser/parser/plugins/add-seed.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-seed.test.js b/tools/challenge-parser/parser/plugins/add-seed.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-seed.test.js rename to tools/challenge-parser/parser/plugins/add-seed.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-solution.js b/tools/challenge-parser/parser/plugins/add-solution.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-solution.js rename to tools/challenge-parser/parser/plugins/add-solution.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-solution.test.js b/tools/challenge-parser/parser/plugins/add-solution.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-solution.test.js rename to tools/challenge-parser/parser/plugins/add-solution.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-tests.js b/tools/challenge-parser/parser/plugins/add-tests.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-tests.js rename to tools/challenge-parser/parser/plugins/add-tests.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-tests.test.js b/tools/challenge-parser/parser/plugins/add-tests.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-tests.test.js rename to tools/challenge-parser/parser/plugins/add-tests.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-text.js b/tools/challenge-parser/parser/plugins/add-text.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-text.js rename to tools/challenge-parser/parser/plugins/add-text.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-text.test.js b/tools/challenge-parser/parser/plugins/add-text.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-text.test.js rename to tools/challenge-parser/parser/plugins/add-text.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-video-question.js b/tools/challenge-parser/parser/plugins/add-video-question.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-video-question.js rename to tools/challenge-parser/parser/plugins/add-video-question.js diff --git a/tools/challenge-md-parser/mdx/plugins/add-video-question.test.js b/tools/challenge-parser/parser/plugins/add-video-question.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/add-video-question.test.js rename to tools/challenge-parser/parser/plugins/add-video-question.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/replace-imports.js b/tools/challenge-parser/parser/plugins/replace-imports.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/replace-imports.js rename to tools/challenge-parser/parser/plugins/replace-imports.js diff --git a/tools/challenge-md-parser/mdx/plugins/replace-imports.test.js b/tools/challenge-parser/parser/plugins/replace-imports.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/replace-imports.test.js rename to tools/challenge-parser/parser/plugins/replace-imports.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/table-and-strikethrough.js b/tools/challenge-parser/parser/plugins/table-and-strikethrough.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/table-and-strikethrough.js rename to tools/challenge-parser/parser/plugins/table-and-strikethrough.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/id-node.json b/tools/challenge-parser/parser/plugins/utils/__fixtures__/id-node.json similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/id-node.json rename to tools/challenge-parser/parser/plugins/utils/__fixtures__/id-node.json diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/image-node.json b/tools/challenge-parser/parser/plugins/utils/__fixtures__/image-node.json similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/image-node.json rename to tools/challenge-parser/parser/plugins/utils/__fixtures__/image-node.json diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/leading-html-node.json b/tools/challenge-parser/parser/plugins/utils/__fixtures__/leading-html-node.json similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/leading-html-node.json rename to tools/challenge-parser/parser/plugins/utils/__fixtures__/leading-html-node.json diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/mdast-mixed-nodes.json b/tools/challenge-parser/parser/plugins/utils/__fixtures__/mdast-mixed-nodes.json similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/mdast-mixed-nodes.json rename to tools/challenge-parser/parser/plugins/utils/__fixtures__/mdast-mixed-nodes.json diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/mdast-with-em.json b/tools/challenge-parser/parser/plugins/utils/__fixtures__/mdast-with-em.json similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/mdast-with-em.json rename to tools/challenge-parser/parser/plugins/utils/__fixtures__/mdast-with-em.json diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/multiple-children.json b/tools/challenge-parser/parser/plugins/utils/__fixtures__/multiple-children.json similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/multiple-children.json rename to tools/challenge-parser/parser/plugins/utils/__fixtures__/multiple-children.json diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/non-id-node.json b/tools/challenge-parser/parser/plugins/utils/__fixtures__/non-id-node.json similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__fixtures__/non-id-node.json rename to tools/challenge-parser/parser/plugins/utils/__fixtures__/non-id-node.json diff --git a/tools/challenge-md-parser/mdx/plugins/utils/__snapshots__/between-headings.test.js.snap b/tools/challenge-parser/parser/plugins/utils/__snapshots__/between-headings.test.js.snap similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/__snapshots__/between-headings.test.js.snap rename to tools/challenge-parser/parser/plugins/utils/__snapshots__/between-headings.test.js.snap diff --git a/tools/challenge-md-parser/mdx/plugins/utils/between-headings.js b/tools/challenge-parser/parser/plugins/utils/between-headings.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/between-headings.js rename to tools/challenge-parser/parser/plugins/utils/between-headings.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/between-headings.test.js b/tools/challenge-parser/parser/plugins/utils/between-headings.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/between-headings.test.js rename to tools/challenge-parser/parser/plugins/utils/between-headings.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/get-file-visitor.js b/tools/challenge-parser/parser/plugins/utils/get-file-visitor.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/get-file-visitor.js rename to tools/challenge-parser/parser/plugins/utils/get-file-visitor.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/get-file-visitor.test.js b/tools/challenge-parser/parser/plugins/utils/get-file-visitor.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/get-file-visitor.test.js rename to tools/challenge-parser/parser/plugins/utils/get-file-visitor.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/get-id.js b/tools/challenge-parser/parser/plugins/utils/get-id.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/get-id.js rename to tools/challenge-parser/parser/plugins/utils/get-id.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/get-id.test.js b/tools/challenge-parser/parser/plugins/utils/get-id.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/get-id.test.js rename to tools/challenge-parser/parser/plugins/utils/get-id.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/mdast-to-html.js b/tools/challenge-parser/parser/plugins/utils/mdast-to-html.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/mdast-to-html.js rename to tools/challenge-parser/parser/plugins/utils/mdast-to-html.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/mdast-to-html.test.js b/tools/challenge-parser/parser/plugins/utils/mdast-to-html.test.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/mdast-to-html.test.js rename to tools/challenge-parser/parser/plugins/utils/mdast-to-html.test.js diff --git a/tools/challenge-md-parser/mdx/plugins/utils/split-on-thematic-break.js b/tools/challenge-parser/parser/plugins/utils/split-on-thematic-break.js similarity index 100% rename from tools/challenge-md-parser/mdx/plugins/utils/split-on-thematic-break.js rename to tools/challenge-parser/parser/plugins/utils/split-on-thematic-break.js diff --git a/tools/challenge-md-parser/mdx/tools/example.md b/tools/challenge-parser/parser/tools/example.md similarity index 100% rename from tools/challenge-md-parser/mdx/tools/example.md rename to tools/challenge-parser/parser/tools/example.md diff --git a/tools/challenge-md-parser/mdx/tools/full-parse.js b/tools/challenge-parser/parser/tools/full-parse.js similarity index 100% rename from tools/challenge-md-parser/mdx/tools/full-parse.js rename to tools/challenge-parser/parser/tools/full-parse.js diff --git a/tools/challenge-md-parser/mdx/tools/generate-ast.js b/tools/challenge-parser/parser/tools/generate-ast.js similarity index 100% rename from tools/challenge-md-parser/mdx/tools/generate-ast.js rename to tools/challenge-parser/parser/tools/generate-ast.js diff --git a/tools/challenge-md-parser/mdx/tools/inspect-ast.js b/tools/challenge-parser/parser/tools/inspect-ast.js similarity index 100% rename from tools/challenge-md-parser/mdx/tools/inspect-ast.js rename to tools/challenge-parser/parser/tools/inspect-ast.js diff --git a/tools/challenge-md-parser/mdx/tools/parse-md.js b/tools/challenge-parser/parser/tools/parse-md.js similarity index 100% rename from tools/challenge-md-parser/mdx/tools/parse-md.js rename to tools/challenge-parser/parser/tools/parse-md.js diff --git a/tools/challenge-md-parser/solution-to-data.js b/tools/challenge-parser/solution-to-data.js similarity index 100% rename from tools/challenge-md-parser/solution-to-data.js rename to tools/challenge-parser/solution-to-data.js diff --git a/tools/challenge-md-parser/solution-to-data.test.js b/tools/challenge-parser/solution-to-data.test.js similarity index 100% rename from tools/challenge-md-parser/solution-to-data.test.js rename to tools/challenge-parser/solution-to-data.test.js diff --git a/tools/challenge-md-parser/tests-to-data.js b/tools/challenge-parser/tests-to-data.js similarity index 100% rename from tools/challenge-md-parser/tests-to-data.js rename to tools/challenge-parser/tests-to-data.js diff --git a/tools/challenge-md-parser/tests-to-data.test.js b/tools/challenge-parser/tests-to-data.test.js similarity index 100% rename from tools/challenge-md-parser/tests-to-data.test.js rename to tools/challenge-parser/tests-to-data.test.js diff --git a/tools/challenge-md-parser/text-to-data.js b/tools/challenge-parser/text-to-data.js similarity index 100% rename from tools/challenge-md-parser/text-to-data.js rename to tools/challenge-parser/text-to-data.js diff --git a/tools/challenge-md-parser/text-to-data.test.js b/tools/challenge-parser/text-to-data.test.js similarity index 100% rename from tools/challenge-md-parser/text-to-data.test.js rename to tools/challenge-parser/text-to-data.test.js diff --git a/tools/challenge-md-parser/translation-parser/__fixtures__/challenge-objects.js b/tools/challenge-parser/translation-parser/__fixtures__/challenge-objects.js similarity index 100% rename from tools/challenge-md-parser/translation-parser/__fixtures__/challenge-objects.js rename to tools/challenge-parser/translation-parser/__fixtures__/challenge-objects.js diff --git a/tools/challenge-md-parser/translation-parser/__mocks__/mock-comments.js b/tools/challenge-parser/translation-parser/__mocks__/mock-comments.js similarity index 100% rename from tools/challenge-md-parser/translation-parser/__mocks__/mock-comments.js rename to tools/challenge-parser/translation-parser/__mocks__/mock-comments.js diff --git a/tools/challenge-md-parser/translation-parser/translation-parser.js b/tools/challenge-parser/translation-parser/translation-parser.js similarity index 100% rename from tools/challenge-md-parser/translation-parser/translation-parser.js rename to tools/challenge-parser/translation-parser/translation-parser.js diff --git a/tools/challenge-md-parser/translation-parser/translation-parser.test.js b/tools/challenge-parser/translation-parser/translation-parser.test.js similarity index 100% rename from tools/challenge-md-parser/translation-parser/translation-parser.test.js rename to tools/challenge-parser/translation-parser/translation-parser.test.js diff --git a/tools/challenge-md-parser/utils/index.js b/tools/challenge-parser/utils/index.js similarity index 100% rename from tools/challenge-md-parser/utils/index.js rename to tools/challenge-parser/utils/index.js