百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

datacamp-light

> 编程语言
开源

将任何博客或网站转换为交互式的数据科学学习平台

1.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

将任何博客或网站转换为交互式的数据科学学习平台

DataCamp Light

Roadmap | Docs

Table of Contents - [Features](#features) - [How to run the app](#how-to-run-the-app) - [Writing the HTML block](#writing-the-html-block) * [Pre-Exercise Code](#pre-exercise-code) * [Sample Code](#sample-code) * [Solution](#solution) * [Submission Correctness Test (SCT)](#submission-correctness-test-sct) * [Hint](#hint) * [Other Options](#other-options) - [How does it work?](#how-does-it-work) - [Contributing](#contributing) * [Dependencies](#dependencies) * [Testing](#testing) + [Run tests](#run-tests) + [Reducers](#reducers) + [Components](#components) + [Middleware](#middleware) * [DevOps](#devops) + [Formatting with Prettier](#formatting-with-prettier) + [Code Quality: ESLint, TSLint, Stylelint](#code-quality-eslint-tslint-stylelint) + [Commit Messages](#commit-messages) + [Continuous Integration](#continuous-integration) + [Packages used that you might want to know about](#packages-used-that-you-might-want-to-know-about) -------------------------------------------------------------------------------- ## Features * Convert any website or blog to an interactive learning platform. * Works for both R and Python. Sessions are maintained on DataCamp's servers. * Convert existing markdown documents to an interactive course using [the tutorial package](https://github.com/datacamp/tutorial). * Check out a [demo R and Python example](https://cdn.datacamp.com/dcl-react/standalone-example.html). * Leverage the same Submission Correctness Tests (SCT) DataCamp uses for all their courses. For R, there's the [testwhat](https://github.com/datacamp/testwhat) ([GitHub wiki](https://github.com/datacamp/testwhat/wiki)); for Python, there's [pythonwhat](https://github.com/datacamp/pythonwhat) ([GitHub wiki](https://github.com/datacamp/pythonwhat/wiki)). ## How to run the app Add the script to your HTML page (there is an example in `examples/standalone-example.html`): ```html ``` That's it! If your app adds DataCamp Light exercises after the initial page load (for example, in React apps), call the following function to initialize those new exercises: ```js initAddedDCLightExercises(); ``` **You can also use the JavaScript library in a stackoverflow.com answer by including the exercise and script tag as a snippet.** ## Writing the HTML block After including the JavaScript library, you can start writing HTML blocks in the format below. These will be dynamically converted to exercises. ```html ``` As we can see in the example, the whole exercise is contained in a single ` ``` … ``` css [data-datacamp-exercise] { visibility: hidden; } ``` … ``` git clone https://github.com/datacamp/datacamp-light.git cd datacamp-light git checkout beta npm i npm start ``` ### Dependencies The `vendor/` folder includes minified code of some internal DataCamp packages that are not hosted publicly right now. ### Testing Please read these two documents before starting to implement any tests: - [Writing tests in redux](http://redux.js.org/docs/recipes/WritingTests.html) - [Writing tests for side effects](https://redux-observable.js.org/docs/recipes/WritingTests.html) Test files are named as `{moduleName}.spec.js`. #### Run tests ```bash npm test ``` … ``` https://cdn.datacamp.com/dcl-react-dev.js.gz ``` Next, commits to the [`beta` branch](https://github.com/datacamp/datacamp-light/tree/beta) push a release to the staging environment: ``` https://cdn.datacamp.com/dcl-react-staging.js.gz ``` Finally, when we create a release, an update is pushed to the production environment. This should be a stable version of DataCamp Light: ``` https://cdn.datacamp.com/dcl-react.js.gz ``` Commits to this branch trigger a build that is deployed on the DataCamp Dev environment. Commits to the main branch, `beta`, are built and deployed to staging. When a release is created, that build is deployed to production. #### Packages used that you might want to know about - [TypeScript](https://www.typescriptlang.org/), of course. Make sure you install an appropriate plugin for your editor, if it doesn't ship with one. - [redux-observable](https://github.com/redux-observable/redux-observable/) for observable middleware - [typescript-fsa](https://github.com/aikoven/typescript-fsa) for easy, type-safe action creators - [typescript-fsa-reducers](https://github.com/dphilipson/typescript-fsa-reducers) for super-clean reducers

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言