Skip to content

Commit 18b5991

Browse files
committed
feat!: align CoCreate repository and package naming
1 parent e32dec3 commit 18b5991

20 files changed

Lines changed: 1124 additions & 45 deletions

‎.github/FUNDING.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These are supported funding model platforms
22

3-
github: CoCreate-app
3+
github: CoCreateJS

‎.github/workflows/automated.yml‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,27 @@ jobs:
1212
- name: Checkout repository
1313
uses: actions/checkout@v7
1414

15-
- name: Sync package.json description to GitHub About
15+
- name: Sync package.json description and keywords to GitHub repository
1616
env:
17-
GITHUB_TOKEN: ${{ secrets.GITHUB }}
17+
GH_TOKEN: ${{ secrets.GITHUB }}
1818
run: |
19-
DESC=$(jq -r '.description // empty' package.json)
20-
if [ -n "$DESC" ]; then
21-
echo "Updating repository description to: $DESC"
22-
gh api -X PATCH repos/${{ github.repository }} -f description="$DESC"
19+
if [ ! -f package.json ]; then
20+
echo "No package.json found; skipping repository metadata sync."
21+
exit 0
22+
fi
23+
24+
DESCRIPTION=$(jq -r '.description // empty' package.json)
25+
if [ -n "$DESCRIPTION" ]; then
26+
gh api --method PATCH "repos/${GITHUB_REPOSITORY}" -f description="$DESCRIPTION"
27+
else
28+
echo "No package description found; leaving GitHub description unchanged."
29+
fi
30+
31+
if jq -e '.keywords | type == "array"' package.json >/dev/null; then
32+
TOPICS=$(jq -c '.keywords | map(ascii_downcase | gsub("[^a-z0-9-]+"; "-") | gsub("(^-+|-+$)"; "") | .[0:50]) | map(select(length > 0)) | unique | .[0:20]' package.json)
33+
printf '{"names":%s}' "$TOPICS" | gh api --method PUT -H "Accept: application/vnd.github+json" "repos/${GITHUB_REPOSITORY}/topics" --input -
2334
else
24-
echo "No description found in package.json."
35+
echo "No package keywords found; leaving GitHub topics unchanged."
2536
fi
2637
2738
release:

‎CONTRIBUTING.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Contributing to CoCreate-render
22

3-
This project is work of [many contributors](https://github.com/CoCreateJS/CoCreate-render/graphs/contributors).
4-
You're encouraged to submit [pull requests](https://github.com/CoCreateJS/CoCreate-render/pulls),
5-
[propose features and discuss issues](https://github.com/CoCreateJS/CoCreate-render/issues).
3+
This project is work of [many contributors](https://github.com/CoCreateJS/render/graphs/contributors).
4+
You're encouraged to submit [pull requests](https://github.com/CoCreateJS/render/pulls),
5+
[propose features and discuss issues](https://github.com/CoCreateJS/render/issues).
66

77
In the examples below, substitute your Github username for `contributor` in URLs.
88

99
## Fork the Project
1010

11-
Fork the [project on Github](https://github.com/CoCreateJS/CoCreate-render) and check out your copy.
11+
Fork the [project on Github](https://github.com/CoCreateJS/render) and check out your copy.
1212

1313
```
1414
git render https://github.com/contributor/CoCreate-render.git
1515
cd CoCreate-render
16-
git remote add upstream https://github.com/cocreatejs/CoCreate-render.git
16+
git remote add upstream https://github.com/CoCreateJS/render.git
1717
```
1818

1919
## Create a Topic Branch
@@ -75,7 +75,7 @@ git push origin my-feature-branch
7575

7676
## Make a Pull Request
7777

78-
Go to [https://github.com/CoCreateJS/CoCreate-render](https://github.com/CoCreateJS/CoCreate-render) and select your feature branch.
78+
Go to [https://github.com/CoCreateJS/render](https://github.com/CoCreateJS/render) and select your feature branch.
7979
Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
8080

8181
## Rebase

‎README.md‎

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ A simple render component in vanilla javascript. Easily configured using HTML5 a
55
![minified](https://img.badgesize.io/https://cdn.CoCreateJS.com/render/latest/CoCreate-render.min.js?style=flat-square&label=minified&color=orange)
66
![gzip](https://img.badgesize.io/https://cdn.CoCreateJS.com/render/latest/CoCreate-render.min.js?compression=gzip&style=flat-square&label=gzip&color=yellow)
77
![brotli](https://img.badgesize.io/https://cdn.CoCreateJS.com/render/latest/CoCreate-render.min.js?compression=brotli&style=flat-square&label=brotli)
8-
![GitHub latest release](https://img.shields.io/github/v/release/CoCreate-app/CoCreate-render?style=flat-square)
9-
![License](https://img.shields.io/github/license/CoCreate-app/CoCreate-render?style=flat-square)
8+
![GitHub latest release](https://img.shields.io/github/v/release/CoCreateJS/render?style=flat-square)
9+
![License](https://img.shields.io/github/license/CoCreateJS/render?style=flat-square)
1010
![Hiring](https://img.shields.io/static/v1?style=flat-square&label=&message=Hiring&color=blueviolet)
1111

1212
![CoCreate-render](https://cdn.CoCreateJS.com/docs/CoCreate-render.gif)
@@ -50,13 +50,13 @@ $ yarn install @cocreate/render
5050

5151
# Announcements
5252

53-
All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreateJS/CoCreate-render/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreateJS/CoCreate-render/releases). You may also subscribe to email for releases and breaking changes.
53+
All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreateJS/render/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreateJS/render/releases). You may also subscribe to email for releases and breaking changes.
5454

5555
<a name="roadmap"></a>
5656

5757
# Roadmap
5858

59-
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/CoCreateJS/CoCreate-render/issues) and [pull requests](https://github.com/CoCreateJS/CoCreate-render/pulls). We would love to hear your feedback.
59+
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/CoCreateJS/render/issues) and [pull requests](https://github.com/CoCreateJS/render/pulls). We would love to hear your feedback.
6060

6161
<a name="about"></a>
6262

@@ -72,9 +72,9 @@ CoCreate-render is maintained and funded by CoCreate. The names and logos for Co
7272

7373
# How to Contribute
7474

75-
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreateJS/CoCreate-render/blob/master/CONTRIBUTING.md) guide for details.
75+
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreateJS/render/blob/master/CONTRIBUTING.md) guide for details.
7676

77-
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/CoCreateJS/CoCreate-render/issues) and [pull requests](https://github.com/CoCreateJS/CoCreate-render/pulls) or merely upvote or comment on existing issues or pull requests.
77+
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/CoCreateJS/render/issues) and [pull requests](https://github.com/CoCreateJS/render/pulls) or merely upvote or comment on existing issues or pull requests.
7878

7979
We appreciate your continued support, thank you!
8080

@@ -84,8 +84,38 @@ We appreciate your continued support, thank you!
8484

8585
This software is dual-licensed under the GNU Affero General Public License version 3 (AGPLv3) and a commercial license.
8686

87-
- **Open Source Use**: For open-source projects and non-commercial use, this software is available under the AGPLv3. The AGPLv3 allows you to freely use, modify, and distribute this software, provided that all modifications and derivative works are also licensed under the AGPLv3. For the full license text, see the [LICENSE file](https://github.com/CoCreateJS/CoCreate-render/blob/master/LICENSE).
87+
- **Open Source Use**: For open-source projects and non-commercial use, this software is available under the AGPLv3. The AGPLv3 allows you to freely use, modify, and distribute this software, provided that all modifications and derivative works are also licensed under the AGPLv3. For the full license text, see the [LICENSE file](https://github.com/CoCreateJS/render/blob/master/LICENSE).
8888

8989
- **Commercial Use**: For-profit companies and individuals intending to use this software for commercial purposes must obtain a commercial license. The commercial license is available when you sign up for an API key on our [website](https://CoCreateJS.com). This license permits proprietary use and modification of the software without the copyleft requirements of the AGPLv3. It is ideal for integrating this software into proprietary commercial products and applications.
9090

9191
If you have not purchased a commercial license and intend to use this software for commercial purposes, you are required to sign up for an API key on our website.
92+
93+
94+
## Server
95+
96+
Render also provides a stateless server-side HTML renderer. Import it from `@cocreate/render/server`; the browser renderer remains available from `@cocreate/render`.
97+
98+
### Server rendering
99+
100+
The `HTML` function processes HTML strings, resolves nested file and database-backed content, applies state and metadata, and protects recursive includes from circular references.
101+
102+
```javascript
103+
import { HTML } from '@cocreate/render/server';
104+
105+
const html = await HTML({
106+
file: {
107+
src: `<html><body><h1 array="posts" object="post-id" key="title"></h1></body></html>`,
108+
pathname: "/pages/dashboard.html",
109+
organization_id: "organization-id"
110+
},
111+
organization: { languages: ["en"] },
112+
urlObject: new URL("https://example.com/pages/dashboard.html"),
113+
lang: "en",
114+
theme: "dark",
115+
crud: crudInstance
116+
});
117+
```
118+
119+
### Server HTML attributes
120+
121+
The server renderer evaluates `src` for nested file fragments, `array` and `object` to resolve records, and `key` to place a value. It also supports `filter`, `value-type="outerHTML"`, `render-error`, `state-id`, and `state-overwrite`. Server rendering marks inserted content with `rendered="true"` so the browser does not fetch the same fragment again.

‎docs/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ <h2 class="padding:5px_0px">Demo</h2>
537537
</div>
538538
</div>
539539
<button
540-
href="https://github.com/CoCreateJS/CoCreate-render/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
540+
href="https://github.com/CoCreateJS/render/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
541541
target="_blank"
542542
class="display:flex justify-content:center align-items:center position:fixed bottom:15px right:15px height:50px width:50px border-radius:50% box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
543543
<i src="../assets/svg/pencil-alt.svg"></i>

‎package.json‎

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@
2222
},
2323
"repository": {
2424
"type": "git",
25-
"url": "git+https://github.com/cocreatejs/CoCreate-render.git"
25+
"url": "git+https://github.com/CoCreateJS/render.git"
2626
},
2727
"author": "CoCreate LLC",
2828
"license": "AGPL-3.0",
2929
"bugs": {
30-
"url": "https://github.com/CoCreateJS/CoCreate-render/issues"
30+
"url": "https://github.com/CoCreateJS/render/issues"
3131
},
3232
"homepage": "https://CoCreateJS.com/docs/render",
3333
"funding": {
3434
"type": "GitHub Sponsors ❤",
35-
"url": "https://github.com/sponsors/CoCreate-app"
35+
"url": "https://github.com/sponsors/CoCreateJS"
3636
},
37-
"main": "./src/index.js",
37+
"main": "./src/server/index.js",
38+
"browser": "./src/client/index.js",
3839
"dependencies": {
3940
"@cocreate/actions": "^1.24.0",
4041
"@cocreate/api": "^1.31.0",
@@ -45,21 +46,14 @@
4546
"devDependencies": {
4647
"@cocreate/webpack": "^1.9.0"
4748
},
48-
"allowScripts": {
49-
"@cocreate/actions@1.21.4": true,
50-
"@cocreate/api@1.22.5": true,
51-
"@cocreate/config@1.13.4": true,
52-
"@cocreate/crud-client@1.34.6": true,
53-
"@cocreate/element-prototype@1.31.4": true,
54-
"@cocreate/elements@1.42.9": true,
55-
"@cocreate/filter@1.33.6": true,
56-
"@cocreate/indexeddb@1.23.4": true,
57-
"@cocreate/local-storage@1.16.5": true,
58-
"@cocreate/observer@1.19.0": true,
59-
"@cocreate/organizations@1.30.1": true,
60-
"@cocreate/render@1.46.1": true,
61-
"@cocreate/socket-client@1.40.5": true,
62-
"@cocreate/utils@1.42.2": true,
63-
"@cocreate/webpack@1.4.3": true
49+
"exports": {
50+
".": {
51+
"node": "./src/server/index.js",
52+
"deno": "./src/server/index.js",
53+
"browser": "./src/client/index.js",
54+
"default": "./src/server/index.js"
55+
},
56+
"./server": "./src/server/index.js",
57+
"./client": "./src/client/index.js"
6458
}
6559
}
File renamed without changes.
File renamed without changes.

‎src/client/package.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"type": "module"
3+
}

0 commit comments

Comments
 (0)