Skip to content

Commit a7660fe

Browse files
committed
fix: add workflow, update to docs, readme
1 parent d1e2c4b commit a7660fe

File tree

15 files changed

+346
-214
lines changed

15 files changed

+346
-214
lines changed

.github/workflows/automated.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Automated
2+
"on":
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
about:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
- name: Jaid/action-sync-node-meta
13+
uses: jaid/action-sync-node-meta@v1.4.0
14+
with:
15+
direction: overwrite-github
16+
githubToken: "${{ secrets.GITHUB }}"
17+
release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
- name: Semantic Release
23+
uses: cycjimmy/semantic-release-action@v2
24+
id: semantic
25+
with:
26+
extra_plugins: |
27+
@semantic-release/changelog
28+
@semantic-release/git
29+
@semantic-release/github
30+
env:
31+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
32+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
33+
outputs:
34+
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
35+
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
36+
cdn:
37+
runs-on: ubuntu-latest
38+
needs: release
39+
if: needs.release.outputs.new_release_published == 'true'
40+
env:
41+
VERSION: "${{ needs.release.outputs.new_release_version }}"
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v2
45+
- name: setup nodejs
46+
uses: actions/setup-node@v2
47+
with:
48+
node-version: 14.15.4
49+
- name: yarn install
50+
run: >
51+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
52+
.npmrc
53+
54+
yarn install
55+
- name: yarn build
56+
run: yarn build
57+
- name: upload bundle as version
58+
uses: CoCreate-app/CoCreate-s3@master
59+
with:
60+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
61+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
62+
bucket: testcrudbucket
63+
source: ./dist
64+
destination: "/email/${{env.VERSION}}"
65+
acl: public-read
66+
- name: upload bundle as latest
67+
uses: CoCreate-app/CoCreate-s3@master
68+
with:
69+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
70+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
71+
bucket: testcrudbucket
72+
source: ./dist
73+
destination: /email/latest
74+
acl: public-read
75+
invalidations: true
76+
docs:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Checkout
80+
uses: actions/checkout@v2
81+
82+
- name: update documentation
83+
uses: CoCreate-app/CoCreate-docs@master

.github/workflows/automation.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/manual.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Manual Workflow
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
invalidations:
6+
description: |
7+
If set to 'true', invalidates previous upload.
8+
default: "true"
9+
required: true
10+
11+
jobs:
12+
cdn:
13+
runs-on: ubuntu-latest
14+
env:
15+
DRY_RUN: ${{ github.event.inputs.dry_run }}
16+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v2
22+
- name: setup nodejs
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: 14.15.4
26+
- name: yarn install
27+
run: >
28+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
29+
.npmrc
30+
31+
yarn install
32+
- name: yarn build
33+
run: yarn build
34+
- name: upload latest bundle
35+
uses: CoCreate-app/CoCreate-s3@master
36+
with:
37+
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
38+
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
39+
distributionId: "${{ secrets.DISTRIBUTION_ID }}"
40+
bucket: testcrudbucket
41+
source: ./dist
42+
destination: /email/latest
43+
acl: public-read
44+
invalidations: ${{ github.event.inputs.invalidations }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
# ignore
22
node_modules
3+
dist
4+
.npmrc
5+
yarn.lock
6+
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
.pnpm-debug.log*

CoCreate.config.js

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,43 @@
11
module.exports = {
2-
config: {
3-
apiKey: "c2b08663-06e3-440c-ef6f-13978b42883a",
4-
securityKey: "f26baf68-e3a9-45fc-effe-502e47116265",
5-
organization_Id: "5de0387b12e200ea63204d6c",
6-
host: "server.cocreate.app:8088"
2+
"config": {
3+
"apiKey": "2061acef-0451-4545-f754-60cf8160",
4+
"organization_Id": "5ff747727005da1c272740ab",
5+
"host": "general.cocreate.app"
76
},
8-
9-
sources: [{
10-
path: "./docs/index.html",
11-
collection: "files",
12-
document_id: "6027120e5e697f4f26a98a53",
13-
key: "html",
14-
data:{
15-
name: "email Doc",
16-
}
17-
},
18-
],
19-
20-
crud: [{
21-
collection: "routes",
22-
document_id: "6027120e5e697f4f26a98a52",
23-
data:{
24-
collection: "files",
25-
document_id: "6027120e5e697f4f26a98a53",
26-
name: "html",
27-
domains: ["cocreate.app", "server.cocreate.app", "ws.cocreate.app"],
28-
route: "/docs/email",
7+
8+
"sources": [{
9+
"entry": "./docs/index.html",
10+
"collection": "files",
11+
"document_id": "6027120e5e697f4f26a98a53",
12+
"key": "src",
13+
"data":{
14+
"name": "index.html",
15+
"path": "/docs/email/index.html",
16+
"domains": [
17+
"cocreate.app",
18+
"general.cocreate.app"
19+
],
20+
"directory": "/docs/email",
21+
"content-type": "text/html",
22+
"public": "true",
23+
"website_id": "614298c2829b690010a5c031"
2924
}
3025
}
3126
],
32-
33-
extract: {
34-
directory: "./src/",
35-
extensions: [
36-
"js",
37-
"css",
38-
"html"
39-
],
40-
ignores: [
41-
"node_modules",
42-
"vendor",
43-
"bower_components",
44-
"archive"
45-
],
46-
}
27+
28+
"extract": {
29+
"directory": "./src/",
30+
"extensions": [
31+
"js",
32+
"css",
33+
"html"
34+
],
35+
"ignores": [
36+
"node_modules",
37+
"vendor",
38+
"bower_components",
39+
"archive"
40+
]
41+
}
4742
}
43+

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 CoCreate LLC
3+
Copyright (c) 2021 CoCreate LLC
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
# CoCreate-email
2+
23
A simple email component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API. Take it for a spin in our [playground!](https://cocreate.app/docs/email)
34

4-
![GitHub file size in bytes](https://img.shields.io/github/size/CoCreate-app/CoCreate-email/dist/CoCreate-email.min.js?label=minified%20size&style=for-the-badge)
5+
![GitHub file size in bytes](https://img.shields.io/github/size/CoCreate-app/CoCreate-email/dist/CoCreate-email.min.js?label=minified%20size&style=for-the-badge)
56
![GitHub latest release](https://img.shields.io/github/v/release/CoCreate-app/CoCreate-email?style=for-the-badge)
6-
![GitHub](https://img.shields.io/github/license/CoCreate-app/CoCreate-email?style=for-the-badge)
7+
![GitHub](https://img.shields.io/github/license/CoCreate-app/CoCreate-email?style=for-the-badge)
78
![GitHub labels](https://img.shields.io/github/labels/CoCreate-app/CoCreate-email/help%20wanted?style=for-the-badge)
89

9-
![CoCreate](https://cdn.cocreate.app/logo.png)
10+
![CoCreate-email](https://cdn.cocreate.app/docs/CoCreate-email.gif)
1011

11-
[CoCreate Docs](https://cocreate.app/docs/email)
12+
## [Docs & Demo](https://cocreate.app/docs/email)
1213

13-
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/CoCreate-app/Realtime_Admin_CRM_and_CMS/issues) and [pull requests](https://github.com/CoCreate-app/Realtime_Admin_CRM_and_CMS/pulls) or merely upvote or comment on existing issues or pull requests.
14+
For a complete guide and working demo refer to the [doumentation](https://cocreate.app/docs/email)
1415

15-
We appreciate your continued support, thank you!
16+
## CDN
17+
18+
```html
19+
<script src="https://cdn.cocreate.app/email/latest/CoCreate-email.min.js"></script>
20+
```
21+
22+
```html
23+
<script src="https://cdn.cocreate.app/email/latest/CoCreate-email.min.css"></script>
24+
```
25+
26+
## NPM
27+
28+
```shell
29+
$ npm install @cocreate/email
30+
```
1631

1732
# Table of Contents
1833

@@ -24,17 +39,19 @@ We appreciate your continued support, thank you!
2439
- [License](#license)
2540

2641
<a name="announcements"></a>
42+
2743
# Announcements
2844

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

3147
<a name="roadmap"></a>
48+
3249
# Roadmap
3350

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

36-
3753
<a name="about"></a>
54+
3855
# About
3956

4057
CoCreate-email is guided and supported by the CoCreate Developer Experience Team.
@@ -44,10 +61,15 @@ Please Email the Developer Experience Team [here](mailto:develop@cocreate.app) i
4461
CoCreate-email is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
4562

4663
<a name="contribute"></a>
64+
4765
# How to Contribute
4866

4967
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreate-app/CoCreate-email/blob/master/CONTRIBUTING.md) guide for details.
5068

69+
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/CoCreate-app/CoCreate-email/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-email/pulls) or merely upvote or comment on existing issues or pull requests.
70+
71+
We appreciate your continued support, thank you!
72+
5173
# License
52-
[The MIT License (MIT)](https://github.com/CoCreate-app/CoCreate-email/blob/master/LICENSE)
5374

75+
[The MIT License (MIT)](https://github.com/CoCreate-app/CoCreate-email/blob/master/LICENSE)

0 commit comments

Comments
 (0)