A Pen by Pavel Lokhmakov on CodePen.
This file contains hidden or 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 { builders as b } from 'ast-types' | |
| import generateRequire from './require' | |
| import generateListAdd from './listAdd' | |
| export default ({ | |
| name, | |
| fields = [], |
This file contains hidden or 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
| const fs = require('fs').promises | |
| const keystone = require('keystone') | |
| const recast = require('recast') | |
| const Types = keystone.Field.Types | |
| const CoreEntity = new keystone.List('CoreEntity') | |
| const generateModel = require('../lib/core/entity/api/generate/model').default |
This file contains hidden or 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 Grid from '@material-ui/core/Grid' | |
| import Button from '@material-ui/core/Button' | |
| import { MapMarker } from 'mdi-material-ui' | |
| import Map from 'pigeon-maps' | |
| import React, { Component } from 'react' | |
| import ReactDOM from 'react-dom' | |
| import compose from 'recompose/compose' | |
| import lifecycle from 'recompose/lifecycle' | |
| import withHandlers from 'recompose/withHandlers' | |
| import withStateHandlers from 'recompose/withStateHandlers' |
This file contains hidden or 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
| body { | |
| background: blue; | |
| } |
This file contains hidden or 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
| const runQuery = createEffect({ | |
| handler(props) { | |
| console.log(props) | |
| }, | |
| }) | |
| const createOnceEvent = to => { | |
| const from = createEvent() | |
| const unsubscribe = forward({from, to}) | |
| from.watch(unsubscribe) |
This file contains hidden or 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 { | |
| createEvent, | |
| createStore, | |
| createEffect, | |
| combine, | |
| forward, | |
| Effect, | |
| Store, | |
| Event, | |
| step |
The philosophy behind Documentation-Driven Development is a simple: from the perspective of a user, if a feature is not documented, then it doesn't exist, and if a feature is documented incorrectly, then it's broken.
- Document the feature first. Figure out how you're going to describe the feature to users; if it's not documented, it doesn't exist. Documentation is the best way to define a feature in a user's eyes.
- Whenever possible, documentation should be reviewed by users (community or Spark Elite) before any development begins.
- Once documentation has been written, development should commence, and test-driven development is preferred.
- Unit tests should be written that test the features as described by the documentation. If the functionality ever comes out of alignment with the documentation, tests should fail.
- When a feature is being modified, it should be modified documentation-first.
- When documentation is modified, so should be the tests.
OlderNewer