# @coodev/core

> Core library for Coodev

Latest version **1.0.0-dev.15** (published 2023-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @coodev/core
pnpm add @coodev/core
yarn add @coodev/core
bun add @coodev/core
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-dev.15 |
| Published | 2023-06-03 |
| First published | 2022-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 35.9 KB |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | panghu1996 |

## Links

- npm: https://www.npmjs.com/package/@coodev/core
- npm.io page: https://npm.io/package/@coodev/core

## Dependencies (4)

- [vite](https://npm.io/package/vite.md) ^4.3.3
- [rollup](https://npm.io/package/rollup.md) ^2.75.4
- [connect](https://npm.io/package/connect.md) ^3.7.0
- [serve-static](https://npm.io/package/serve-static.md) ^1.15.0

## Recent versions

- 1.0.0-dev.15 (latest) — 2023-06-03
- 1.0.0-dev.1 (dev) — 2022-05-12
- 1.0.0-dev.14 — 2023-06-03
- 1.0.0-dev.13 — 2023-05-27
- 1.0.0-dev.12 — 2023-05-12
- 1.0.0-dev.11 — 2023-05-07
- 1.0.0-dev.10 — 2023-02-24
- 1.0.0-dev.9 — 2023-02-24
- 1.0.0-dev.8 — 2023-02-13
- 1.0.0-dev.7 — 2023-02-12
- 1.0.0-dev.6 — 2023-02-12
- 1.0.0-dev.5 — 2023-02-11
- 1.0.0-dev.4 — 2023-02-04
- 1.0.0-dev.3 — 2023-02-04
- 1.0.0-dev.2 — 2023-02-04

## README

# Coodev Core

## Usage

### Install

```bash
npm i @coodev/react react react-dom
```

#### Create pages

Create page component in `pages` directory, for example `pages/index.tsx`

```typescript
import React from 'react'

export default function Home() {
  return <div>Home</div>
}
```

### Development

Add dev script in `package.json`

```json
{
  "scripts": {
    "dev": "coodev-react"
  }
}
```

Start development server

```bash
npm run dev
```

### Build

Add build script in `package.json`

```json
{
  "scripts": {
    "build": "coodev-react build"
  }
}
```

Build

```bash
npm run build
```

## Coodev Configuration
```typescript
/**
 * config
 */
const coodevConfig = {
  root: '.',
  ssr: {
    streamingHtml: true,
  },
  runtimeConfig: {},
  plugins: [
    {
      configResolved?(config: InternalConfiguration): Promisable<void>
      configureCoodev?(coodev: Coodev): void | (() => void)
      buildEnd?(options: BuildEndOptions, output: BuildOutput): Promisable<void>
      documentHtml?(html: string): Promisable<void | string>
      htmlRendered?(html: string): Promisable<void | string>
    }
  ],
}
```

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