Skip to content

cosmicjs/react-extension-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cosmic JS React Extension Starter

Extend the Cosmic JS dashboard experience. Cosmic JS Extensions enable you to:

  • Create custom views in your Cosmic JS dashboard
  • Connect to third-party APIs

What is a Comsic JS Extension?

In short, it's a JAMstack app. It can be a simple static website, or complex web app, using front end web technology.

Links

Extension docs

Extension examples

Installation

  1. Download the .zip file in this repo
  2. Login to Cosmic JS and go to Your Bucket > Settings > Extensions > Add Extension

Required files

extension.json

Key Type Description
title String Function title
font_awesome_class String Icon to display in the Bucket sidenav
image_url String Image thumbnail
repo_url String Extension source code url

Example extension.json file:

{
  "title": "Extension Starter",
  "font_awesome_class": "fa-rocket",
  "image_url": "https://cosmicjs.com/images/marketing/logo-w-brand.jpg",
  "repo_url": "https://github.com/cosmicjs/extension-starter"
}

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run export

Export the contents of this app into the build folder, then zip the build into extension.zip file for upload to Cosmic JS.