Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 71 additions & 71 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
{
"name": "coderoad-vscode",
"displayName": "CodeRoad",
"description": "Interactive tutorials in your editor",
"version": "0.0.1",
"engines": {
"vscode": "^1.34.0"
},
"categories": [
"Other"
],
"publisher": "Shawn McKay",
"author": {
"name": "Shawn McKay <shawn.j.mckay@gmail.com>"
},
"bugs": {
"url": "https://github.com/shmck/coderoad-vscode/issues",
"email": "shawn.j.mckay@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/shmck/coderoad-vscode.git"
},
"homepage": "https://github.com/shmck/coderoad-vscode/README.md",
"galleryBanner": {
"color": "#C80000",
"theme": "dark"
},
"activationEvents": [
"onCommand:coderoad.start"
],
"main": "./build/extension.js",
"contributes": {
"commands": [
{
"command": "coderoad.start",
"title": "Start",
"category": "CodeRoad"
},
{
"command": "coderoad.set_layout",
"title": "Set Layout",
"category": "CodeRoad"
}
]
},
"scripts": {
"vscode:prepublish": "npm run build",
"machine": "node ./out/state/index.js",
"build": "rm -rf build && concurrently \"npm run build:ext\" \"npm run build:web\"",
"build:ext": "npm run compile",
"build:web": "cd web-app && npm run build",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"storybook": "cd web-app && npm run storybook",
"test": "npm run build && node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"@types/mocha": "^5.2.7",
"@types/node": "^12.6.2",
"concurrently": "^4.1.1",
"prettier": "^1.18.2",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.5.3"
},
"dependencies": {
"vscode": "^1.1.35",
"xstate": "^4.6.7"
},
"license": "SEE LICENSE IN LICENSE.md"
"name": "coderoad-vscode",
"displayName": "CodeRoad",
"description": "Interactive tutorials in your editor",
"version": "0.0.1",
"engines": {
"vscode": "^1.34.0"
},
"categories": [
"Other"
],
"publisher": "Shawn McKay",
"author": {
"name": "Shawn McKay <shawn.j.mckay@gmail.com>"
},
"bugs": {
"url": "https://github.com/shmck/coderoad-vscode/issues",
"email": "shawn.j.mckay@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/shmck/coderoad-vscode.git"
},
"homepage": "https://github.com/shmck/coderoad-vscode/README.md",
"galleryBanner": {
"color": "#C80000",
"theme": "dark"
},
"activationEvents": [
"onCommand:coderoad.start"
],
"main": "./build/extension.js",
"contributes": {
"commands": [
{
"command": "coderoad.start",
"title": "Start",
"category": "CodeRoad"
},
{
"command": "coderoad.set_layout",
"title": "Set Layout",
"category": "CodeRoad"
}
]
},
"scripts": {
"vscode:prepublish": "npm run build",
"machine": "node ./out/state/index.js",
"build": "rm -rf build && concurrently \"npm run build:ext\" \"npm run build:web\"",
"build:ext": "npm run compile",
"build:web": "cd web-app && npm run build",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"storybook": "cd web-app && npm run storybook",
"test": "npm run build && node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"@types/mocha": "^5.2.7",
"@types/node": "^12.6.2",
"concurrently": "^4.1.1",
"prettier": "^1.18.2",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.5.3"
},
"dependencies": {
"vscode": "^1.1.35",
"xstate": "^4.6.7"
},
"license": "SEE LICENSE IN LICENSE.md"
}
57 changes: 24 additions & 33 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "build",
"lib": [
"es6",
"dom"
],
"sourceMap": true,
"rootDir": "src",
"baseUrl": "src",
"strict": true, /* enable all strict type-checking options */
/* Additional Checks */
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"paths": {
"typings": ["../typings/index.d.ts"]
},
},
"exclude": [
"node_modules",
".vscode-test",
"build",
"resources",
"web-app"
]
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "build",
"lib": ["es6", "dom"],
"sourceMap": true,
"rootDir": "src",
"baseUrl": "src",
"strict": true /* enable all strict type-checking options */,
/* Additional Checks */
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"paths": {
"typings": ["../typings/index.d.ts"]
}
},
"exclude": ["node_modules", ".vscode-test", "build", "resources", "web-app"]
}
35 changes: 13 additions & 22 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
{
"extends": [
"tslint:latest",
"tslint-config-prettier"
],
"rules": {
"no-string-throw": true,
"no-unused-expression": true,
"no-duplicate-variable": true,
"curly": true,
"class-name": true,
"semicolon": [
true,
"never"
],
"triple-equals": true,
"interface-name": [
true,
"never-prefix"
]
},
"defaultSeverity": "warning",
"no-submodule-imports": false,
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"no-string-throw": true,
"no-unused-expression": true,
"no-duplicate-variable": true,
"curly": true,
"class-name": true,
"semicolon": [true, "never"],
"triple-equals": true,
"interface-name": [true, "never-prefix"]
},
"defaultSeverity": "warning",
"no-submodule-imports": false
}
3 changes: 2 additions & 1 deletion web-app/.storybook/addons.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@storybook/addon-actions/register'
import '@storybook/addon-links/register'
import '@storybook/addon-knobs/register'
import '@storybook/addon-links/register'

2 changes: 1 addition & 1 deletion web-app/.storybook/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { configure } from '@storybook/react'
import '@alifd/next/dist/next.css'
import { configure } from '@storybook/react'

// automatically import all files ending in *.stories.tsx
const req = require.context('../stories', true, /\.stories\.tsx$/)
7,302 changes: 3,720 additions & 3,582 deletions web-app/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web-app/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
"moment": "^2.24.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-markdown": "^4.1.0",
"react-scripts": "3.0.1",
"typescript": "^3.5.1"
},
4 changes: 3 additions & 1 deletion web-app/src/components/Level/index.tsx
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@ import * as React from 'react'
import { Button, Card } from '@alifd/next'
import CR from 'typings'

import Markdown from '../Markdown'

const styles = {
card: {
// width: '20rem',
@@ -24,7 +26,7 @@ const Level = ({ level, stages, onNext, onBack }: Props) => {
const { title, text } = level.content
return (
<Card style={styles.card} title={title} showTitleBullet={false} contentHeight="auto">
<p>{text}</p>
<Markdown>{text}</Markdown>
<div>
{level.stageList.map((stageId: string) => {
const stage = stages[stageId]
10 changes: 10 additions & 0 deletions web-app/src/components/Markdown/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as React from 'react'
import ReactMarkdown from 'react-markdown'

interface Props {
children: string
}

const Markdown = (props: Props) => <ReactMarkdown source={props.children} />

export default Markdown
3 changes: 2 additions & 1 deletion web-app/src/components/Stage/index.tsx
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ import * as React from 'react'
import { Button, Card } from '@alifd/next'
import CR from 'typings'

import Markdown from '../Markdown'
import Step from '../Step'

const styles = {
@@ -23,7 +24,7 @@ const Stage = ({ stage, steps, onNextStage, complete }: Props) => {
const { title, text } = stage.content
return (
<Card style={styles.card} title={title} showTitleBullet={false} contentHeight="auto">
<p>{text}</p>
<Markdown>{text}</Markdown>
<div>
{stage.stepList.map((stepId: string) => {
const step = steps[stepId]
5 changes: 4 additions & 1 deletion web-app/src/components/Step/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react'
import Markdown from '../Markdown'
import { Checkbox } from '@alifd/next'
// import CC from '../../typings/client'
import CR from 'typings'
@@ -36,7 +37,9 @@ const Step = ({ content, status }: Props) => {
<div style={styles.left}>
<Checkbox checked={status.complete} />
</div>
<div style={styles.right}>{content.text}</div>
<div style={styles.right}>
<Markdown>{content.text}</Markdown>
</div>
</div>
)
}
28 changes: 9 additions & 19 deletions web-app/tsconfig.paths.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
{
"compilerOptions": {
"baseUrl": "src",
"rootDirs": [
"src",
"stories"
],
"paths": {
"typings": [
"../../typings/index.d.ts"
]
}
"compilerOptions": {
"baseUrl": "src",
"rootDirs": ["src", "stories"],
"paths": {
"typings": ["../../typings/index.d.ts"]
},
"exclude": [
"node_modules",
"build",
"scripts",
"jest",
"public"
]
}
"allowSyntheticDefaultImports": true
},
"exclude": ["node_modules", "build", "scripts", "jest", "public"]
}