# codepost-embed

> A web component to embed codePost on your site.

Latest version **1.0.11** (published 2020-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install codepost-embed
pnpm add codepost-embed
yarn add codepost-embed
bun add codepost-embed
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2020-04-20 |
| First published | 2020-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | codePost, LLC |
| Maintainers | rfre |
| Keywords | codePost, autograder, code review |

## Links

- npm: https://www.npmjs.com/package/codepost-embed
- Repository: https://github.com/codepost-io/codePost-embed
- Homepage: http://codepost.io
- Issues: https://github.com/codepost-io/codePost-embed/issues
- npm.io page: https://npm.io/package/codepost-embed

## Recent versions

- 1.0.11 (latest) — 2020-04-20
- 1.0.9 — 2020-04-20
- 1.0.8 — 2020-04-20
- 1.0.7 — 2020-04-19
- 1.0.6 — 2020-04-19
- 1.0.5 — 2020-04-14
- 1.0.4 — 2020-04-13
- 1.0.3 — 2020-04-10
- 1.0.2 — 2020-04-09
- 1.0.1 — 2020-04-09
- 1.0.0 — 2020-04-09

## README

# codepost-embed

[![Travis][build-badge]][build]
[![npm package][npm-badge]][npm]
[![Coveralls][coveralls-badge]][coveralls]

codepost-embed is a React component to conveniently embed codePost on your site.

codePost [https://codepost.io](https://codepost.io) is a programming teaching tool used
for autograding, code commenting, plagiarism detection, course management, and more.
codePost is free for higher ed use.

Please contact team@codepost.io if you are interested in building an integration.

## Installation

```
$ npm install codepost-embed --save
```

## Usage

```
import CodePostEmbed from 'codepost-embed';

// The starting url route from https://codepost.io
// Examples:
//      route = "/student"
//      route = "/grader"
//      route = "/code/100"
const route = "/"

// The user authentication token
const token = "..."

// The name of your app
const source = "Code in Place"


return (
  <div
    style={{
      height: "80vh",
      width: "80vw",
      margin: "0 auto",
      border: "6px inset gray",
      borderRadius: "8px",
    }}
  >
    <CodePostEmbed route={route} token={token} source={source} />
  </div>
);
```

## Props

| Name       | Description                                                                                                             | Type                                | Required? |
| ---------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | --------- |
| token      | authentication token                                                                                                    | string                              | True      |
| source     | the name of the parent app                                                                                              | string                              | True      |
| route      | the starting route for codePost                                                                                         | string                              | False     |
| assignment | A codePost assignment ID. If specified, codePost will open the student's upload window for this assignment.             | number                              | False     |
| files      | A list of files. If specified along with an assignment, codePost will pre-set the files to be uploaded for the student. | [{name: string, data: string}, ...] | False     |

[build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
[build]: https://travis-ci.org/user/repo
[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
[npm]: https://www.npmjs.org/package/npm-package
[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
[coveralls]: https://coveralls.io/github/user/repo

---
_Source: https://npm.io/package/codepost-embed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
