chore(curriculum): Remove files in wrong format

This commit is contained in:
Bouncey
2018-10-04 14:37:37 +01:00
committed by Stuart Taylor
parent 61222b1fb6
commit 8f39bc1288
2947 changed files with 118541 additions and 212907 deletions

View File

@ -1,6 +1,5 @@
const unified = require('unified');
const vfile = require('to-vfile');
const report = require('vfile-reporter');
const markdown = require('remark-parse');
const remark2rehype = require('remark-rehype');
const html = require('rehype-stringify');
@ -25,10 +24,14 @@ const processor = unified()
// we need to write a compiler that can create graphql nodes
.use(html);
processor.process(vfile.readSync('maybe.md'), function(err, file) {
if (err) {
throw err;
}
console.error(report(file));
console.log(JSON.stringify(file.data, null, 2));
});
exports.parseMarkdown = function parseMarkdown(file) {
return new Promise((resolve, reject) =>
processor.process(vfile.readSync(file), function(err, file) {
if (err) {
reject(err);
}
delete file.contents;
return resolve(file.data);
})
);
};

View File

@ -1,5 +1,5 @@
{
"name": "migration",
"name": "@freecodecamp/challenge-md-parser",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
@ -2351,7 +2351,8 @@
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"has-symbols": {
"version": "1.0.0",
@ -2807,7 +2808,8 @@
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
"is-generator-fn": {
"version": "1.0.0",
@ -5426,6 +5428,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
"is-fullwidth-code-point": "2.0.0",
"strip-ansi": "4.0.0"
@ -5455,6 +5458,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
"ansi-regex": "3.0.0"
},
@ -5462,7 +5466,8 @@
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
}
}
},
@ -5493,6 +5498,7 @@
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "3.0.0"
}
@ -5962,23 +5968,6 @@
"unist-util-stringify-position": "1.1.2"
}
},
"vfile-reporter": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/vfile-reporter/-/vfile-reporter-5.0.0.tgz",
"integrity": "sha512-p1zv4/AfRWUtXEJ0dYSPo1JGS1qL4R95YiHKF7V/8BcXq1buSYIwE660QAHmE7u8tVOjgKp2+oW4RHe+AO+K5Q==",
"requires": {
"repeat-string": "1.6.1",
"string-width": "2.1.1",
"supports-color": "5.5.0",
"unist-util-stringify-position": "1.1.2",
"vfile-statistics": "1.1.1"
}
},
"vfile-statistics": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/vfile-statistics/-/vfile-statistics-1.1.1.tgz",
"integrity": "sha512-dxUM6IYvGChHuwMT3dseyU5BHprNRXzAV0OHx1A769lVGsTiT50kU7BbpRFV+IE6oWmU+PwHdsTKfXhnDIRIgQ=="
},
"w3c-hr-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz",

View File

@ -1,5 +1,5 @@
{
"name": "migration",
"name": "@freecodecamp/challenge-md-parser",
"version": "1.0.0",
"description": "",
"main": "index.js",
@ -24,7 +24,6 @@
"remark-rehype": "^3.0.1",
"to-vfile": "^5.0.1",
"unified": "^7.0.0",
"unist-util-visit": "^1.4.0",
"vfile-reporter": "^5.0.0"
"unist-util-visit": "^1.4.0"
}
}