⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
- http://tutsplus.com/tutorial/writing-modular-javascript/
- https://github.com/aranm/scalable-javascript-architecture
- https://github.com/patrick99e99/scalable-js-architecture-app
- http://scaleapp.org/
- http://addyosmani.com/largescalejavascript/
- https://github.com/tcorral/Hydra.js/
- http://alanlindsay.me/kerneljs/
- http://terrifically.org/
- https://github.com/gorillatron/cerebral
We're currently working on making it easier to add new field types to KeystoneJS as plugins.
In the meantime, if you'd like to work on your own field type, hopefully this guide will point you in the right direction.
Keystone fields require the following:
- a
{fieldType}.js
file in./lib/fieldTypes
that controls the field and encapsulates options support, underscore functions, validation and updating - the
{fieldType}.js
file needs to be included by./lib/fieldTypes/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config/environment.js | |
// This is not for production. But it will get your | |
// console to stop screaming errors if your messing | |
// around with ember cli | |
module.exports = function(environment) { | |
//lots of stuff | |
// <Add this chunk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Required Draf-js version: 0.10. | |
// Live example: https://jsfiddle.net/schabluk/gh2gt22n/ | |
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import {Editor, EditorState, EditorBlock} from 'draft-js' | |
class Line extends React.Component { | |
render () { | |
const blockMap = this.props.contentState.getBlockMap().toArray() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type StackOps<S, A> = { | |
init(): S | |
push(s: S, x: A): void | |
pop(s: S): A | |
size(s: S): number | |
} | |
type Stack<A> = <R>(go: <S>(ops: StackOps<S, A>) => R) => R | |
const arrayStack = <A>(): Stack<A> => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Monad.Reader (Reader, runReader, ReaderT(..), runReaderT, ask, class MonadAsk) | |
import Effect (Effect) | |
import Effect.Class (class MonadEffect, liftEffect) | |
import Effect.Console (log) | |
--------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useMemo } from 'react'; | |
import { | |
Document as PDFDocument, | |
StyleSheet, | |
Page, | |
Font, | |
} from '@react-pdf/renderer'; | |
import dig from 'lodash.get'; | |
import PageFooter from './PageFooter'; | |
import CoverPage from './CoverPage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nc from "next-connect"; | |
const { setQueues, BullAdapter, router } = require("bull-board"); | |
import emailQueue from 'queues/emailQueue'; // or wherever your queues lie | |
setQueues([ | |
new BullAdapter(emailQueue), | |
]); | |
const handler = nc().use( |