@tipe/cli
Tipe CLI
Last updated 23 days ago by hendrixer .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @tipe/cli 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.18.0                                ...           latest (23 days ago)

41 Versions

  • 1.18.0                                ...           23 days ago
  • 1.17.2                                ...           25 days ago
  • 1.17.1                                ...           a month ago
  • 1.17.0                                ...           a month ago
  • 1.16.1                                ...           a month ago
  • 1.16.0                                ...           a month ago
  • 1.15.2                                ...           a month ago
  • 1.15.1                                ...           a month ago
  • 1.15.0                                ...           a month ago
  • 1.14.0                                ...           a month ago
  • 1.13.0                                ...           a month ago
  • 1.12.0                                ...           a month ago
  • 1.11.2                                ...           2 months ago
  • 1.11.1                                ...           2 months ago
  • 1.11.0                                ...           2 months ago
  • 1.10.1                                ...           2 months ago
  • 1.10.0                                ...           2 months ago
  • 1.9.0                                ...           2 months ago
  • 1.8.2                                ...           2 months ago
  • 1.8.1                                ...           3 months ago
  • 1.8.0                                ...           3 months ago
  • 1.7.3                                ...           6 months ago
  • 1.7.2                                ...           8 months ago
  • 1.7.1                                ...           8 months ago
  • 1.7.0                                ...           8 months ago
  • 1.6.5                                ...           8 months ago
  • 1.6.4                                ...           9 months ago
  • 1.6.3                                ...           9 months ago
  • 1.6.2                                ...           9 months ago
  • 1.6.1                                ...           9 months ago
  • 1.6.0                                ...           9 months ago
  • 1.5.0                                ...           9 months ago
  • 1.4.1                                ...           9 months ago
  • 1.4.0                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 41
Last Month 99
Dependencies (21)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |