Skip to content

Commit

Permalink
update docs, run verb
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Mar 24, 2017
1 parent 7b555b7 commit ad53e70
Show file tree
Hide file tree
Showing 4 changed files with 319 additions and 101 deletions.
129 changes: 94 additions & 35 deletions .verb.md
@@ -1,30 +1,38 @@
{{#block "logo"}}
<p align="center">
<a href="{%= homepage %}">
<a href="https://github.com/node-base/base">
<img height="250" width="250" src="https://raw.githubusercontent.com/node-base/base/master/docs/logo.png">
</a>
</p>
{{/block}}

{{#block "about"}}
## What is Base?
# {%= name %}

Base is a framework for rapidly creating high quality node.js applications, using plugins like building blocks.
{%= badge("npm") %} {%= badge('downloads') %} {%= ifExists(["test", "test.js"], badge('travis')) %} {%= badge('gitter') %}

<details>
<summary><strong>Table of contents</strong></summary>
<!-- toc -->
</details>

<details>
<summary><strong>About</strong></summary>

## Why use Base?

* Create a unit-testable, high-quality node.js application in minutes
* Return on (time) investment: Learn Base, and you will be familiar with the core API of all applications built on Base. This means you will not only benefit as a developer, but as a user as well.
* Use any [base plugin](https://www.npmjs.com/browse/keyword/baseplugin) to add feature-functionality to your application
* Use plugins from [other applications](#in-the-wild) built on Base
Base is the foundation for creating modular, unit testable and highly pluggable node.js applications.

* Go from zero to working application within minutes
* Create your own custom plugins to add features
* Use [community plugins](https://www.npmjs.com/browse/keyword/baseplugin) to add feature-functionality to your application
* Plugins are stackable, so you can build up [more sophisticated applications](#toolkit-suite) from simpler plugins. Moreover, those applications can also be used as plugins themselves.

Most importantly, once you learn Base, you will be familiar with the core API of all applications built on Base. This means you will not only benefit as a developer, but as a user as well.

### Guiding principles

The core team follows these principles to help guide API decisions:

- **Compact API surface**: The smaller the API surface, the easier the library will be to learn and use.
- **Easy to extend**: Implementors can use any npm package, and write plugins in pure JavaScript. If you're building complex apps, Base simplifies inheritance.
- **Easy to extend**: Implementors can use any npm package, and write plugins in pure JavaScript. If you're building complex apps, Base dramatically simplifies inheritance.
- **Easy to test**: No special setup should be required to unit test `Base` or base plugins

### Minimal API surface
Expand Down Expand Up @@ -67,6 +75,8 @@ function plugin(base) {
base.use(plugin);
```

Add "smart plugin" functionality with the [base-plugins][] plugin.

**Inheritance**

Easily inherit Base using `.extend`:
Expand Down Expand Up @@ -99,52 +109,101 @@ app.set('foo', 'bar');
console.log(app.cache.foo);
//=> 'bar'
```
</details>


{{/block}}
## Install

**NPM**

## API
## Install

{%= include("install-npm", {save: true}) %}

**Usage**
**yarn**

Install with [yarn](yarnpkg.com):

```sh
$ yarn add base && yarn upgrade
```

## Usage

```js
var Base = require('base');
var app = new Base();

// set a value
app.set('foo', 'bar');
console.log(app.foo);
//=> 'bar'

// register a plugin
app.use(function() {
// do stuff (see API docs for ".use")
});
```

## API
{%= apidocs("index.js") %}

## In the wild
## Toolkit suite

The following node.js applications were built with `Base`:
Base is used as the foundation for all of the applications in the [toolkit suite](https://github.com/node-toolkit/getting-started) (except for [enquirer][]):

- [assemble][]
- [verb][]
- [generate][]
- [scaffold][]
- [boilerplate][]
**Building blocks**

## Test coverage
- [base][]: (you are here!) framework for rapidly creating high quality node.js applications, using plugins like building blocks.
- [templates][]: API for managing template collections and rendering templates with any node.js template engine. Can be used as the basis for creating a static site generator, blog framework, documentaton system, and so on.
- [enquirer][]: composable, plugin-based prompt system (Base is used in [prompt-base][], the core prompt module that powers all prompt plugins)

```
{%= coverage('coverage/summary.txt') %}
```
**Lifecycle**

Developer frameworks and command line tools that address common phases of the software development lifecycle. Each of these tools can be used entirely standalone, but they work even better together.

- [generate][]: create projects
- [assemble][]: build projects
- [verb][]: document projects
- [update][]: maintain projects

## About
### Related projects
{%= related(verb.related.list) %}

### Tests
{%= include("tests") %}

### Contributing
{%= include("contributing") %}

If Base doesn't do what you need, [please let us know](../../issues).

### Release History
{%= increaseHeadings(increaseHeadings(changelog('changelog.md', {
changelogFooter: true,
stripHeading: true,
repo: repo
}))) %}

### Authors

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

**Brian Woodward**

## History
* [github/doowb](https://github.com/doowb)
* [twitter/doowb](http://twitter.com/doowb)

**v0.11.0 - major breaking changes!**
### License
{%= copyright() %}
{%= license %}

- Static `.use` and `.run` methods are now non-enumerable
***

**v0.9.0 - major breaking changes!**
{%= include("footer") %}

- `.is` no longer takes a function, a string must be passed
- all remaining `.debug` code has been removed
- `app._namespace` was removed (related to `debug`)
- `.plugin`, `.use`, and `.define` no longer emit events
- `.assertPlugin` was removed
- `.lazy` was removed
{%= reflinks(verb.reflinks) %}

0 comments on commit ad53e70

Please sign in to comment.