Define a schema under a config key in your plugin main.
module.exports = {
config: {
someStr: {
title: 'host',
description: 'plantuml server',| // @flow | |
| import { type HOC } from 'recompose' | |
| import { connect } from 'react-redux' | |
| import type { Dispatch } from '../types' | |
| type CHOC<E: {}> = HOC<{ ...$Exact<E>, dispatch: Dispatch }, E> | |
| export default function getDispatch<Enhanced: {}>(): CHOC<Enhanced> { | |
| return (connect(): Function) | |
| } |
| ReactDOM.render( | |
| <Highlight | |
| value='use strict;' | |
| language='javascript' | |
| />, | |
| document.getElementById('root') | |
| ) |
| function Highlight (props) { | |
| const { value, language } = props | |
| const elements = [] | |
| let index = 0 | |
| const pushElement = (token, style) => { | |
| elements.push(<span className={style || ''} key={++index}>{token}</span>) | |
| } | |
| const mode = CodeMirror.findModeByName(language) | |
| CodeMirror.runMode(value, mode ? mode.mime : language, (token, style) => { | |
| pushElement(token, style) |
| 'use babel' | |
| import { React } from 'inkdrop' | |
| function createCodeBlockClass (OriginalCode) { | |
| return class CodeBlock extends React.Component { | |
| static propTypes = { | |
| className: PropTypes.string, | |
| lang: PropTypes.string, | |
| children: PropTypes.any |
| '.CodeMirror': | |
| 'ctrl-shift-up': 'native!' | |
| 'ctrl-shift-down': 'native!' |
| { | |
| "name": "inkdrop-api", | |
| "description": "Inkdrop API", | |
| "runtime": "nodejs6.10", | |
| "memory": 128, | |
| "timeout": 5, | |
| "role": "arn:aws:iam::*********:role/inkdrop-api_lambda_function", | |
| "environment": {}, | |
| "hooks": { | |
| "build": "cp -r ../../node_modules/* ./node_modules/" |
| { | |
| "name": "inkdrop-api-lambda", | |
| "version": "1.0.0", | |
| "dependencies": { | |
| "formidable": "^1.1.1", | |
| "aws-serverless-express": "^3.0.2" | |
| } | |
| } |
| const langs = {} | |
| function registerLanguage (lang, func) { | |
| langs[lang] = func | |
| } | |
| registerLanguage('1c', require('highlight.js/lib/languages/1c')) | |
| registerLanguage('accesslog', require('highlight.js/lib/languages/accesslog')) | |
| registerLanguage('actionscript', require('highlight.js/lib/languages/actionscript')) | |
| registerLanguage('ada', require('highlight.js/lib/languages/ada')) |
| Sat, 09 Jan 2016 15:15:11 GMT pouchdb:adapter Picked adapter: leveldb | |
| Sat, 09 Jan 2016 15:15:11 GMT pouchdb:api ./db put { _id: 'note/0', data: 0 } | |
| Sat, 09 Jan 2016 15:15:11 GMT pouchdb:api ./db put { _id: 'note/0', data: 0 } | |
| Sat, 09 Jan 2016 15:15:11 GMT pouchdb:api ./db bulkDocs { docs: [ { _id: 'note/0', data: 0 } ] } {} | |
| Sat, 09 Jan 2016 15:15:11 GMT pouchdb:api ./db bulkDocs success [ { ok: true, | |
| id: 'note/0', | |
| rev: '1-5ca9bca689f0ce33c8e331e68caba5c2' } ] | |
| Sat, 09 Jan 2016 15:15:11 GMT pouchdb:api ./db put success { ok: true, | |
| id: 'note/0', | |
| rev: '1-5ca9bca689f0ce33c8e331e68caba5c2' } |