Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ems-project/publisher
https://github.com/ems-project/publisher
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ems-project/publisher
- Owner: ems-project
- License: mit
- Created: 2020-07-10T13:39:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-26T10:09:28.000Z (almost 4 years ago)
- Last Synced: 2024-11-08T02:41:23.109Z (12 days ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elasticms publisher
NPM package for publishing through [elasticms](https://www.elasticms.eu) API.
## Installation
```bash
npm install @elasticms/publisher
```## Usage
### ems-zip-create
```bash
npx ems-zip-create --helpUsage: ems-zip-create
Options:
--filename Filename zip [string] [default: "publish.zip"]
--globs glob patterns) [array] [default: ["**"]]
```#### examples
create a zip named publish.zip with all files
```bash
npx ems-zip-create
```create a zip named example.zip with all html files
```bash
npx ems-zip-create --filename example.zip --globs *.html
```create a zip named example.zip with all files except html files
```bash
npx ems-zip-create --filename example.zip --globs ** '!*.html'
```create a zip with all files in the directory named assets
```bash
npx ems-zip-create --filename example.zip --globs assets/**
```### ems-zip-publish
**IMPORTANT**: for using this command you need to define 2 environment variables named **EMS_URL** and **EMS_TOKEN**.
```bash
npx ems-zip-publishUsage: ems-zip-publish
Commands:
zip-publish.js ems-publish [emsId] emsId (contentType:ouuid)Options:
--filename Filename zip [string] [default: "publish.zip"]
--field Field name [string] [default: "zip_file"]
```#### examples
Upload the zip named example.zip and create/finalize a new revision for the page with ouuid (AWAST5ok8KzLLWaPKqlr)
```bash
npx ems-zip-publish page:AWAST5ok8KzLLWaPKqlr --filename example.zip --field example_zip
```