1.0.34 • Published 6 years ago

react-template-preview v1.0.34

Weekly downloads
137
License
-
Repository
-
Last release
6 years ago

react-template-preview

This module allows developers to preview CurrentCoin Create templates.

CurrentCoin Create templates must meet the following criteria:

  • A file named index.js which exports a React component
  • A file named interface.json which specifies the user adjustable template parameters
  • A file named package.json which specifies the dependencies

index.js

The root React component of your template should be exported from this file.

The code can be written in ES6. This file is run through create-react-app so it supports all of the same features.

interface.json

This file specifies the parameters which a user can adjust before they deploy your template.

It specifies the parameters, their type, and their default values.

For example,

{
  "title": {
    "type": "string",
    "default": "제목입니다"
  },
  "content": {
    "type": "string",
    "default": "내용이나 정보를 적습니다"
  },
  "inverted": {
    "type": "boolean",
    "default": false
  },
  "spinSpeed": {
    "type": "range",
    "min": 1,
    "max": 60,
    "default": 5
  },
  "spinAxis": {
    "type": "enum",
    "values": ["x", "y", "z"],
    "default": "z"
  }
}

package.json

This is the standard npm package file which must specify the npm modules which your template depends on. Dependencies can be added to this file in the standard way, npm install title-case.

For example,

{
  "dependencies": {
    "@material-ui/core": "^1.2.1",
    "axios": "^0.18.0",
    "camel-case": "^3.0.0",
    "react-template-preview": "^1.0.25",
    "title-case": "^2.1.1"
  }
}

To Start

Run npm install and npm start

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago