Skip to content

Commit 75272cc

Browse files
committed
feat: Initial Release
0 parents  commit 75272cc

15 files changed

+833
-0
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: CoCreate-app

.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/[email protected]
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: "/file-server/${{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: /file-server/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/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: /file-server/latest
43+
acl: public-read
44+
invalidations: ${{ github.event.inputs.invalidations }}

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# ignore
2+
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*

CHANGELOG.md

Whitespace-only changes.

CONTRIBUTING.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Contributing to CoCreate-file-server
2+
3+
This project is work of [many contributors](https://github.com/CoCreate-app/CoCreate-file-server/graphs/contributors).
4+
You're encouraged to submit [pull requests](https://github.com/CoCreate-app/CoCreate-file-server/pulls),
5+
[propose features and discuss issues](https://github.com/CoCreate-app/CoCreate-file-server/issues).
6+
7+
In the examples below, substitute your Github username for `contributor` in URLs.
8+
9+
## Fork the Project
10+
11+
Fork the [project on Github](https://github.com/CoCreate-app/CoCreate-file-server) and check out your copy.
12+
13+
```
14+
git clone https://github.com/contributor/CoCreate-file-server.git
15+
cd CoCreate-file-server
16+
git remote add upstream https://github.com/CoCreate-app/CoCreate-file-server.git
17+
```
18+
19+
## Create a Topic Branch
20+
21+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix on dev branch.
22+
23+
```
24+
git checkout dev
25+
git pull upstream dev
26+
git checkout -b my-feature-branch
27+
```
28+
29+
## Write Tests
30+
31+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
32+
33+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
34+
35+
## Write Code
36+
37+
Implement your feature or bug fix.
38+
39+
## Write Documentation
40+
41+
Document any external behavior in the [README](README.md).
42+
43+
## Commit Changes
44+
45+
Make sure git knows your name and email address:
46+
47+
```
48+
git config --global user.name "Your Name"
49+
git config --global user.email "[email protected]"
50+
```
51+
52+
We use [semantic-release](https://github.com/semantic-release/semantic-release) as process to generate changelog
53+
and to release. Write meaningful commits according to
54+
[Commit Message Formats](https://github.com/semantic-release/semantic-release#commit-message-format) is important.
55+
56+
```
57+
git add ...
58+
git commit -am "commit-type(optional topic): a meaningful message"
59+
```
60+
61+
Here is an example of the release type that should be done based on a [semantic-release](https://github.com/semantic-release/semantic-release):
62+
63+
| Commit message | Release type |
64+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
65+
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
66+
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
67+
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
68+
69+
70+
## Push
71+
72+
```
73+
git push origin my-feature-branch
74+
```
75+
76+
## Make a Pull Request
77+
78+
Go to [https://github.com/CoCreate-app/CoCreate-file-server](https://github.com/CoCreate-app/CoCreate-file-server) and select your feature branch.
79+
Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
80+
81+
## Rebase
82+
83+
If you've been working on a change for a while, rebase with upstream/dev.
84+
85+
```
86+
git fetch upstream
87+
git rebase upstream/dev
88+
git push origin my-feature-branch -f
89+
```
90+
91+
## Be Patient
92+
93+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang in there!
94+
95+
## Thank You
96+
97+
Please do know that we really appreciate and value your time and work. We love you, really.

CoCreate.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
"config": {
3+
"apiKey": "2061acef-0451-4545-f754-60cf8160",
4+
"organization_id": "5ff747727005da1c272740ab",
5+
"host": "general.cocreate.app"
6+
},
7+
8+
"sources": [{
9+
"entry": "./docs/index.html",
10+
"collection": "files",
11+
"document": {
12+
"_id": "60145dc49f64ba1680b86693",
13+
"name": "index.html",
14+
"path": "/docs/file-server/index.html",
15+
"src": "{{source}}",
16+
"domains": [
17+
"cocreate.app",
18+
"general.cocreate.app"
19+
],
20+
"directory": "/docs/file-server",
21+
"content-type": "text/html",
22+
"public": "true",
23+
"website_id": "5ffbceb7f11d2d00103c4535"
24+
}
25+
}
26+
]
27+
}
28+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 CoCreate LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# CoCreate-file-server
2+
3+
A simple file-server 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/file-server)
4+
5+
![min file size in bytes](https://img.badgesize.io/https://cdn.cocreate.app/file-server/latest/CoCreate-file-server.min.js?style=flat-square&label=minified&color=orange)
6+
![gzip file size in bytes](https://img.badgesize.io/https://cdn.cocreate.app/file-server/latest/CoCreate-file-server.min.js?compression=gzip&style=flat-square&label=gzip&color=yellow)
7+
![brotlifile size in bytes](https://img.badgesize.io/https://cdn.cocreate.app/file-server/latest/CoCreate-file-server.min.js?compression=brotli&style=flat-square&label=brotli)
8+
![GitHub latest release](https://img.shields.io/github/v/release/CoCreate-app/CoCreate-file-server?style=flat-square)
9+
![GitHub](https://img.shields.io/github/license/CoCreate-app/CoCreate-file-server?style=flat-square)
10+
![GitHub](https://img.shields.io/static/v1?style=flat-square&label=&message=Hiring&color=blueviolet)
11+
12+
13+
![CoCreate-file-server](https://cdn.cocreate.app/docs/CoCreate-file-server.gif)
14+
15+
## [Docs & Demo](https://cocreate.app/docs/file-server)
16+
17+
For a complete guide and working demo refer to the [doumentation](https://cocreate.app/docs/file-server)
18+
19+
## CDN
20+
21+
```html
22+
<script src="https://cdn.cocreate.app/file-server/latest/CoCreate-file-server.min.js"></script>
23+
```
24+
25+
```html
26+
<script src="https://cdn.cocreate.app/file-server/latest/CoCreate-file-server.min.css"></script>
27+
```
28+
29+
## NPM
30+
31+
```shell
32+
$ npm i @cocreate/file-server
33+
```
34+
35+
## yarn
36+
37+
```shell
38+
$ yarn install @cocreate/file-server
39+
```
40+
41+
# Table of Contents
42+
43+
- [Table of Contents](#table-of-contents)
44+
- [Announcements](#announcements)
45+
- [Roadmap](#roadmap)
46+
- [How to Contribute](#how-to-contribute)
47+
- [About](#about)
48+
- [License](#license)
49+
50+
<a name="announcements"></a>
51+
52+
# Announcements
53+
54+
All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreate-app/CoCreate-file-server/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreate-app/CoCreate-file-server/releases). You may also subscribe to email for releases and breaking changes.
55+
56+
<a name="roadmap"></a>
57+
58+
# Roadmap
59+
60+
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-file-server/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-file-server/pulls). We would love to hear your feedback.
61+
62+
<a name="about"></a>
63+
64+
# About
65+
66+
CoCreate-file-server is guided and supported by the CoCreate Developer Experience Team.
67+
68+
Please Email the Developer Experience Team [here](mailto:[email protected]) in case of any queries.
69+
70+
CoCreate-file-server is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
71+
72+
<a name="contribute"></a>
73+
74+
# How to Contribute
75+
76+
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreate-app/CoCreate-file-server/blob/master/CONTRIBUTING.md) guide for details.
77+
78+
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-file-server/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-file-server/pulls) or merely upvote or comment on existing issues or pull requests.
79+
80+
We appreciate your continued support, thank you!
81+
82+
# License
83+
84+
[The MIT License (MIT)](https://github.com/CoCreate-app/CoCreate-file-server/blob/master/LICENSE)

0 commit comments

Comments
 (0)