Skip to content

Commit de40c30

Browse files
committed
initial setup as closed-source community repo
0 parents  commit de40c30

7 files changed

Lines changed: 283 additions & 0 deletions

File tree

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Bug Report
2+
description: Report a bug with CodePress Engine
3+
title: "[BUG] "
4+
labels: ["bug"]
5+
body:
6+
- type: checkboxes
7+
id: preflight
8+
attributes:
9+
label: Preflight Checklist
10+
options:
11+
- label: I have searched existing issues and this is not a duplicate
12+
required: true
13+
- label: I am using the latest version of `@codepress/codepress-engine`
14+
required: true
15+
16+
- type: textarea
17+
id: description
18+
attributes:
19+
label: Bug Description
20+
description: A clear description of what the bug is.
21+
placeholder: What happened?
22+
validations:
23+
required: true
24+
25+
- type: textarea
26+
id: expected
27+
attributes:
28+
label: Expected Behavior
29+
description: What did you expect to happen?
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: reproduction
35+
attributes:
36+
label: Steps to Reproduce
37+
description: Minimal steps to reproduce the issue.
38+
placeholder: |
39+
1. Install `@codepress/codepress-engine@x.y.z`
40+
2. Add to next.config.mjs...
41+
3. Run `npm run dev`
42+
4. See error...
43+
validations:
44+
required: true
45+
46+
- type: dropdown
47+
id: plugin
48+
attributes:
49+
label: Plugin Type
50+
description: Which plugin are you using?
51+
options:
52+
- SWC (Next.js)
53+
- Babel
54+
- Webpack Plugin
55+
- Vite Plugin
56+
- esbuild Plugin
57+
- Dev Server / CLI
58+
- Other
59+
validations:
60+
required: true
61+
62+
- type: input
63+
id: version
64+
attributes:
65+
label: Engine Version
66+
description: Output of `npm list @codepress/codepress-engine`
67+
placeholder: "0.9.4"
68+
validations:
69+
required: true
70+
71+
- type: input
72+
id: framework
73+
attributes:
74+
label: Framework & Version
75+
description: "e.g., Next.js 15.1.0, Vite 6.0.0"
76+
placeholder: "Next.js 15.1.0"
77+
78+
- type: input
79+
id: node
80+
attributes:
81+
label: Node.js Version
82+
description: Output of `node --version`
83+
placeholder: "v22.0.0"
84+
85+
- type: textarea
86+
id: logs
87+
attributes:
88+
label: Error Logs
89+
description: Paste any relevant error output or logs.
90+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: CodePress Website
4+
url: https://codepress.dev
5+
about: Visit the CodePress website for documentation and guides
6+
- name: npm Package
7+
url: https://www.npmjs.com/package/@codepress/codepress-engine
8+
about: View the package on npm
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement
3+
title: "[FEATURE] "
4+
labels: ["enhancement"]
5+
body:
6+
- type: checkboxes
7+
id: preflight
8+
attributes:
9+
label: Preflight Checklist
10+
options:
11+
- label: I have searched existing issues and this is not a duplicate
12+
required: true
13+
14+
- type: textarea
15+
id: problem
16+
attributes:
17+
label: Problem
18+
description: What problem does this feature solve? What's the use case?
19+
placeholder: "I'm trying to... but currently..."
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: solution
25+
attributes:
26+
label: Proposed Solution
27+
description: How would you like this to work?
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: alternatives
33+
attributes:
34+
label: Alternatives Considered
35+
description: Any workarounds or alternative approaches you've tried?
36+
37+
- type: dropdown
38+
id: category
39+
attributes:
40+
label: Category
41+
options:
42+
- Babel Plugin
43+
- SWC Plugin
44+
- Webpack Plugin
45+
- Vite Plugin
46+
- esbuild Plugin
47+
- Dev Server / CLI
48+
- Framework Support
49+
- Performance
50+
- Documentation
51+
- Other
52+
validations:
53+
required: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
node_modules/

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
All notable changes to `@codepress/codepress-engine` will be documented here.
4+
5+
## 0.9.4
6+
7+
- Vite plugin support
8+
- Integration test suite
9+
- Improved SWC WASM auto-detection
10+
11+
## 0.9.1
12+
13+
- Webpack plugin for production module mapping
14+
- esbuild plugin support
15+
- React refresh provider
16+
- Improved CLI with `setup` command
17+
18+
## 0.8.0
19+
20+
- SWC plugin with automatic WASM binary selection
21+
- Support for Next.js 14 and 15
22+
- XOR-encoded file paths for security
23+
24+
## 0.7.0
25+
26+
- Initial public release
27+
- Babel plugin with `codepress-data-fp` attribute injection
28+
- Fastify development server
29+
- CLI for local development

LICENSE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Proprietary License
2+
3+
Copyright (c) 2025 Codepress
4+
5+
All rights reserved.
6+
7+
This software and associated documentation files (the "Software") are the proprietary property of Codepress. Use of the Software is governed by the license agreement that you entered into with Codepress.
8+
9+
Unauthorized copying, distribution, modification, public display, public performance, or creation of derivative works of the Software or any part thereof is strictly prohibited. This includes, but is not limited to, integrating or using the Software with third-party services without explicit permission from Codepress.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# CodePress Engine
2+
3+
[![npm version](https://img.shields.io/npm/v/@codepress/codepress-engine.svg)](https://www.npmjs.com/package/@codepress/codepress-engine)
4+
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17.0-brightgreen.svg)](https://nodejs.org)
5+
6+
Instrumentation engine for the [CodePress](https://codepress.dev) visual editor. Ships Babel and SWC plugins, a webpack plugin, a development server, and a CLI for React and Next.js projects.
7+
8+
## Installation
9+
10+
```bash
11+
npm install @codepress/codepress-engine
12+
```
13+
14+
## Next.js Setup
15+
16+
```js
17+
// next.config.mjs
18+
import { createSWCPlugin } from "@codepress/codepress-engine/swc";
19+
import CodePressWebpackPlugin from "@codepress/codepress-engine/webpack-plugin";
20+
21+
const nextConfig = {
22+
experimental: {
23+
swcPlugins: [createSWCPlugin()],
24+
},
25+
webpack: (config, { isServer, dev }) => {
26+
config.plugins.push(new CodePressWebpackPlugin({ isServer, dev }));
27+
return config;
28+
},
29+
};
30+
31+
export default nextConfig;
32+
```
33+
34+
## Babel Setup
35+
36+
```js
37+
// babel.config.mjs
38+
export default {
39+
plugins: ["@codepress/codepress-engine"],
40+
};
41+
```
42+
43+
## Vite Setup
44+
45+
```js
46+
// vite.config.ts
47+
import { codepressVitePlugin } from "@codepress/codepress-engine/vite-plugin";
48+
49+
export default {
50+
plugins: [codepressVitePlugin()],
51+
};
52+
```
53+
54+
## Local Development Server
55+
56+
Run the CodePress dev server alongside your app for local visual editing:
57+
58+
```bash
59+
npx codepress && npm start
60+
```
61+
62+
See `npx codepress help` for all available commands.
63+
64+
## Package Exports
65+
66+
| Export | Description |
67+
| -------------------------------------------- | ---------------------------------------- |
68+
| `@codepress/codepress-engine` | Main entry (Babel plugin) |
69+
| `@codepress/codepress-engine/babel` | Babel plugin (CommonJS) |
70+
| `@codepress/codepress-engine/swc` | SWC plugin factory & WASM helpers |
71+
| `@codepress/codepress-engine/webpack-plugin` | Webpack plugin for production module map |
72+
| `@codepress/codepress-engine/vite-plugin` | Vite plugin |
73+
| `@codepress/codepress-engine/esbuild` | esbuild plugin |
74+
| `@codepress/codepress-engine/server` | Fastify development server |
75+
| `@codepress/codepress-engine/cli` | CLI (`codepress` binary) |
76+
77+
## How It Works
78+
79+
1. **Build time** — The Babel or SWC plugin injects `codepress-data-fp` attributes into JSX elements, encoding source file paths and line numbers
80+
2. **Runtime** — The CodePress browser extension reads these attributes to identify source locations when you select an element
81+
3. **Editing** — Changes flow to either the local dev server (writes to disk) or the CodePress backend (commits to GitHub)
82+
4. **Production** — The webpack plugin creates a module map enabling hot module replacement in production builds
83+
84+
## Reporting Bugs
85+
86+
Found a bug? [Open an issue](https://github.com/quantfive/codepress-engine/issues/new?template=bug_report.yml) on this repository.
87+
88+
## License
89+
90+
Copyright (c) 2025 CodePress. All rights reserved. See [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)