1.18.0 • Published 4 years ago

@tipe/cli v1.18.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 years ago

Tipe CLI

Tipe logo Build Status

CLI for Tipe. Manage your content templates and projects.

Getting started

Install the CLI with npm

npm i @tipe/cli

with yarn

yarn add @tipe/cli

Create templates for your content

// tipe.js

module.exports = {
  templates: {
    home: {
      name: 'Home',
      fields: {
        heroImage: {
          name: 'Hero Image',
          type: 'image'
        },
        heroTitle: {
          name: 'Hero Title',
          type: 'text'
        }
      }
    }
  }
}

Start the offline mock API

tipe serve

Query for mock content in your app with the SDK

npm i @tipe/js
yarn add @tipe/js
// app.js

const tipe = require('@tipe/js')({offline: true})

const getHomePageContent = () => tipe.document.list({template: 'home'})

Going to production

  1. Create an account on Tipe
  2. Push up your templates to your Tipe project
tipe push --config tipe.js --project your-project-id --apikey your-api-key
  1. Change SDK to use live API in Production
const tipe = require('@tipe/js')({
  offline: process.env.NODE_ENV !== 'production',
  project: YOUR_TIPE_PROJECT_ID,
  key: YOUR_TIPE_API_KEY
})

Creating Templates

module.exports = {
  templates: {
    home: { // template id. Used in the API arguments and responses
    
      disabled: false, // you can only disabled templates from the dashboard if you no longer need them
      
      name: 'Home', // template name is used on the dashbard for content creators
      
      fields: { // all templates must have fields
      
        title: { // field id. Used in the API arguments and responses
        
          disabled: false, // you can only disabled fields from the dashboard if you no longer need them
        
          name: 'Title', // field name is used on the dashboard for content creators,
          
          type: 'text' // the type of content
        }  
      }
    }
  }
}

Field types

  • text
  • code
  • markdown
  • image
  • button
  • html

Issues

For problems directly related to the CLI, add an issue on GitHub.

For other issues, submit a support ticket.

Developing

yarn link
yarn install

The core plugins are located in ./src/commands

To cut a release, commit you messages using our commit guide

1.18.0

4 years ago

1.17.2

4 years ago

1.17.1

4 years ago

1.17.0

4 years ago

1.16.1

4 years ago

1.16.0

4 years ago

1.15.2

4 years ago

1.15.1

4 years ago

1.15.0

5 years ago

1.14.0

5 years ago

1.13.0

5 years ago

1.12.0

5 years ago

1.11.2

5 years ago

1.11.1

5 years ago

1.11.0

5 years ago

1.10.1

5 years ago

1.10.0

5 years ago

1.9.0

5 years ago

1.8.2

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.5

5 years ago

1.6.4

5 years ago

1.6.3

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

1.0.0

6 years ago