Skip to content

Commit

Permalink
feat: practice platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north committed Sep 1, 2018
1 parent 6b889df commit 1b023fd
Show file tree
Hide file tree
Showing 20 changed files with 223 additions and 34 deletions.
41 changes: 36 additions & 5 deletions src/data/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,61 @@ import ALL_TOOLS_WITH_ID from './categories/tools-and-editors';
import { Resource } from './resource';

// @ts-check
const ALL_CATEGORIES: Resource.Categories = {
const ALL_CATEGORIES = {
playground: {
description: 'Web-based tools for running code right in a web browser',
id: 'playground',
name: 'Playgrounds',
order: 9,
},
bootcamp: {
description:
'Curated and structured education that leads to leveling up your skills through exercises, projects and quizzes',
id: 'bootcamp',
name: 'Learning platforms and bootcamps',
order: 1,
url: 'https://en.wikipedia.org/wiki/Coding_bootcamp',
},
practicePlatform: {
description:
"Collections of exercises to help you sharpen your skills and learn at your own pace. Good for practice once you've mastered the basics",
id: 'practicePlatform',
name: 'Practice Platform',
order: 1.2,
},
dataScience: {
description:
'The scientific methods, processes, algorithms and systems used to extract knowledge and insights from data',
id: 'dataScience',
name: 'Data Science',
order: 2,
url: 'https://en.wikipedia.org/wiki/Data_science',
},
generalProgramming: {
description: 'General computer programming skills & techniques',
id: 'generalProgramming',
name: 'General Programming',
order: 1,
order: 3,
url: 'https://en.wikipedia.org/wiki/Computer_programming',
},
languages: {
children: ALL_LANGUAGES_WITH_ID,
description: 'Programming languages',
id: 'languages',
name: 'Languages',
order: 3,
order: 5,
url: 'https://en.wikipedia.org/wiki/Programming_languages',
},
toolsAndEditors: {
children: ALL_TOOLS_WITH_ID,
description: 'Build tools, text editors, IDEs and more',
id: 'toolsAndEditors',
name: 'Tools & Editors',
order: 2,
order: 4,
url: 'https://en.wikipedia.org/wiki/Programming_tool',
},
};

export default ALL_CATEGORIES;
export type TopLevelCategoryName = keyof typeof ALL_CATEGORIES;

export default ALL_CATEGORIES as Resource.Categories;
16 changes: 7 additions & 9 deletions src/data/categories/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import { Resource } from '../resource';
import ALL_WEB_FRAMEWORKS_WITH_ID from './client-web-frameworks';

const ALL_JS_TOPICS = {
node: {
description: "Run JavaScript in a places other than a web browser, using Chrome's V8 engine",
id: 'node',
name: 'Node.js',
url: 'https://nodejs.org/',
},
clientWebFrameworks: {
children: ALL_WEB_FRAMEWORKS_WITH_ID,
description: 'Frameworks for building web applications that run in the browser',
Expand Down Expand Up @@ -29,13 +35,5 @@ export default {
id: 'javascript',
name: 'JavaScript',
url: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript',
children: {
clientWebFrameworks: {
children: ALL_WEB_FRAMEWORKS_WITH_ID,
description: 'Frameworks for building web applications that run in the browser',
id: 'clientWebFrameworks',
name: 'Client Web Frameworks',
url: 'https://en.wikipedia.org/wiki/Web_framework',
},
},
children: ALL_JS_TOPICS,
};
24 changes: 15 additions & 9 deletions src/data/resource.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// @ts-check
import ALL_CATEGORIES from './categories';
import ALL_CATEGORIES, { TopLevelCategoryName } from './categories';
import { ProgrammingLanguage } from './categories/languages';

import { pipe } from '../utils';
import { ClientWebFramework } from './categories/client-web-frameworks';
import { JSTopic } from './categories/javascript';
import { ToolName } from './categories/tools-and-editors';
import allBootcamps from './sites/bootcamps';
import allGames from './sites/games';
import allPlaygrounds from './sites/playgrounds';
import allPracticePlatforms from './sites/practice-platforms';
import allVideoCourses from './sites/video-course';

export interface Resource {
id: string;
platforms: Resource.Platform[];
categoryIds: Array<
| ['toolsAndEditors']
| ['generalProgramming']
| ['clientWebFrameworks']
| [TopLevelCategoryName]
| ['languages', ProgrammingLanguage]
| ['toolsAndEditors', ToolName]
| ['languages', 'javascript', JSTopic]
Expand All @@ -26,7 +26,7 @@ export interface Resource {
author?: Resource.Entity;
authorOrg?: Resource.Entity;
publisher?: Resource.Entity;
type: Resource.Type;
type: Resource.Type | Resource.Type[];
kidOriented?: boolean;
description: string;
url: string;
Expand Down Expand Up @@ -55,15 +55,15 @@ export declare namespace Resource {
type: Price.Type;
frequency: Price.Frequency;
}
type Type = 'game' | 'playground' | 'video-course';
type Type = 'game' | 'playground' | 'video-course' | 'learning-platform';
type Platform = 'ios' | 'android' | 'web' | 'windows' | 'os x' | 'linux';
interface Category<ID extends string = string> {
id: ID;
name: string;
description?: string;
order?: number | string;
order?: number;
img?: string;
url: string;
url?: string;
}
type Categories<P extends string = ''> = {
[L in string]: Category<L> &
Expand All @@ -76,7 +76,13 @@ export declare namespace Resource {
};
}

const ALL_SITES: Resource[] = [...allGames, ...allPlaygrounds, ...allVideoCourses];
const ALL_SITES: Resource[] = [
...allGames,
...allPlaygrounds,
...allVideoCourses,
...allBootcamps,
...allPracticePlatforms,
];

function siteMap(sites: Resource[]): { [k: string]: Resource[] } {
const m: { [k: string]: Resource[] } = {};
Expand Down
7 changes: 7 additions & 0 deletions src/data/sites/bootcamps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import codeacademy from './bootcamps/codeacademy';
import freecodecamp from './bootcamps/free-code-camp';
import khan from './bootcamps/khan-academy';
import nodeschool from './bootcamps/node-school';
import odin from './bootcamps/odin-project';

export default [codeacademy, freecodecamp, odin, khan, nodeschool];
21 changes: 21 additions & 0 deletions src/data/sites/bootcamps/codeacademy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Resource } from '../../resource';

const r: Resource = {
categoryIds: [
['bootcamp'],
['dataScience'],
['languages', 'javascript'],
['languages', 'python'],
['languages', 'ruby'],
['languages', 'java'],
],
description: 'Free platform for online learning web technologies, computer programming and data science.',
id: 'codeacademy',
name: 'Codeacademy',
platforms: ['web'],
price: 0,
type: 'learning-platform',
url: 'https://www.codecademy.com/',
};

export default r;
14 changes: 14 additions & 0 deletions src/data/sites/bootcamps/free-code-camp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Resource } from '../../resource';

const r: Resource = {
categoryIds: [['bootcamp'], ['languages', 'javascript']],
description: 'The king of free coding camps. Learn to code and help nonprofits. Extensive curriculum.',
id: 'freecodecamp',
name: 'Free Code Camp',
platforms: ['web'],
price: 0,
type: 'learning-platform',
url: 'https://www.freecodecamp.org/',
};

export default r;
14 changes: 14 additions & 0 deletions src/data/sites/bootcamps/khan-academy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Resource } from '../../resource';

const r: Resource = {
categoryIds: [['bootcamp'], ['generalProgramming']],
description: 'Learn anything for free, forever.',
id: 'khan-academy',
name: 'Khan Academy',
platforms: ['web'],
price: 0,
type: 'learning-platform',
url: 'https://www.khanacademy.org/',
};

export default r;
14 changes: 14 additions & 0 deletions src/data/sites/bootcamps/node-school.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Resource } from '../../resource';

const r: Resource = {
categoryIds: [['bootcamp'], ['languages', 'javascript', 'node']],
description: 'Open source workshops that teach web software skills. Do them on your own or at a workshop nearby.',
id: 'nodeschool',
name: 'Node School',
platforms: ['web'],
price: 0,
type: 'learning-platform',
url: 'https://nodeschool.io/',
};

export default r;
14 changes: 14 additions & 0 deletions src/data/sites/bootcamps/odin-project.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Resource } from '../../resource';

const r: Resource = {
categoryIds: [['bootcamp'], ['languages', 'ruby'], ['languages', 'javascript']],
description: 'A full stack (and open source) Ruby/JS bootcamp',
id: 'odin-project',
name: 'The Odin Project',
platforms: ['web'],
price: 0,
type: 'learning-platform',
url: 'https://www.theodinproject.com/',
};

export default r;
4 changes: 0 additions & 4 deletions src/data/sites/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import checkIO from './games/check-io';
import codeCombat from './games/code-combat';
import codeHunt from './games/code-hunt';
import codeMonkey from './games/code-monkey';
import codeWars from './games/code-wars';
import codingGame from './games/codin-game';
import cssDiner from './games/css-diner';
import cyberDojo from './games/cyber-dojo';
import flexboxDefense from './games/flexbox-defense';
import flexboxFrogger from './games/flexbox-frogger';
import gitGame from './games/git-game';
Expand All @@ -27,10 +25,8 @@ export default [
codeCombat,
codeHunt,
codeMonkey,
codeWars,
codingGame,
cssDiner,
cyberDojo,
flexboxDefense,
flexboxFrogger,
gitGame,
Expand Down
2 changes: 1 addition & 1 deletion src/data/sites/games/branching-game.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Resource } from '../../resource';

const learnGitBranching: Resource = {
categoryIds: [['toolsAndEditors']],
categoryIds: [['toolsAndEditors', 'git']],
description: '"The most visual and interactive way to learn Git on the web"',
id: 'learnGitBranching',
name: 'Learn Git Branching',
Expand Down
2 changes: 1 addition & 1 deletion src/data/sites/games/git-game.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Resource } from '../../resource';

const gitGames: Resource = {
categoryIds: [['toolsAndEditors']],
categoryIds: [['toolsAndEditors', 'git']],
description:
'A terminal based game that teaches both new and advances users some pretty cool features of the git scm (source control management) system',
id: 'gitGames',
Expand Down
5 changes: 4 additions & 1 deletion src/data/sites/playgrounds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ export default [
stackblitz,
codepen,
codeSandbox,
];
].map(cat => {
cat.categoryIds.push(['playground']);
return cat;
});
6 changes: 6 additions & 0 deletions src/data/sites/practice-platforms.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import codeWars from './practice-platforms/code-wars';
import cyberDojo from './practice-platforms/cyber-dojo';
import edabit from './practice-platforms/edabit';
import techio from './practice-platforms/tech-io';

export default [edabit, techio, codeWars, cyberDojo];
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Resource } from '../../resource';

const cyberDojo: Resource = {
categoryIds: [
['practicePlatform'],
['languages', 'bash'],
['languages', 'c'],
['languages', 'cSharp'],
Expand Down
25 changes: 25 additions & 0 deletions src/data/sites/practice-platforms/edabit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Resource } from '../../resource';

const r: Resource = {
categoryIds: [
['practicePlatform'],
['languages', 'javascript'],
['languages', 'python'],
['languages', 'ruby'],
['languages', 'java'],
['languages', 'swift'],
['languages', 'php'],
['languages', 'cSharp'],
['languages', 'c++'],
],
description:
'Work through a wide array of bite-sized programming challenges, that increase in difficulty as you progress',
id: 'edabit',
name: 'Edabit',
platforms: ['web'],
price: 0,
type: 'learning-platform',
url: 'https://edabit.com/',
};

export default r;
33 changes: 33 additions & 0 deletions src/data/sites/practice-platforms/tech-io.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Resource } from '../../resource';

const techio: Resource = {
categoryIds: [
['practicePlatform'],
['languages', 'bash'],
['languages', 'cSharp'],
['languages', 'c++'],
['languages', 'css'],
['languages', 'elixir'],
['languages', 'go'],
['languages', 'groovy'],
['languages', 'haskell'],
['languages', 'java'],
['languages', 'javascript'],
['languages', 'kotlin'],
['languages', 'php'],
['languages', 'python'],
['languages', 'ruby'],
['languages', 'rust'],
['languages', 'scala'],
['languages', 'swift'],
],
description: 'Design, share, and learn from community-sourced tutorials quizzes and interactive exercises',
id: 'techio',
name: 'TechIO',
platforms: ['web'],
price: 0,
type: ['playground', 'learning-platform'],
url: 'https://tech.io/',
};

export default techio;
2 changes: 1 addition & 1 deletion src/format/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Resource } from '../data/resource';
import { mdHeader } from './utils';

export const mdCategory = (cat: Resource.Category, level: number): string => {
const parts = [mdHeader(`[${cat.name}](${cat.url})`, level)];
const parts = [mdHeader(cat.url ? `[${cat.name}](${cat.url})` : cat.name, level)];
if (cat.description) {
parts.push('\n', '\n', cat.description);
}
Expand Down
Loading

0 comments on commit 1b023fd

Please sign in to comment.