Skip to content

Commit

Permalink
fix: meta tweaks and basic test
Browse files Browse the repository at this point in the history
Signed-off-by: Charlike Mike Reagent <olsten.larck@gmail.com>
  • Loading branch information
Charlike Mike Reagent committed Jul 29, 2018
1 parent a17d7f9 commit 281af7b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ yarn add {%= name %}
```

## API
{%= include('docs/README.md') %}
{%= include('docs/API.md') %}

**[back to top](#thetop)**

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Project is [semantically](https://semver.org) & automatically released on [Circl
- [Users](#users)
- [License](#license)

_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_

## Install
This project requires [**Node.js**](https://nodejs.org) **^8.9.0 || ^10.6.0**. Install it using [**yarn**](https://yarnpkg.com) or [**npm**](https://npmjs.com).
_We highly recommend to use Yarn when you think to contribute to this project._
Expand All @@ -67,7 +69,7 @@ _Generated using [docks](http://npm.im/docks)._
### [src/index.js](/src/index.js)

#### [docks](/src/index.js#L47)
> Constructor that gives you methods.
Constructor that gives you methods.

**Returns**
- `Object` instance of `Docks`
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/README.md → docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _Generated using [docks](http://npm.im/docks)._
### [src/index.js](/src/index.js)

#### [docks](/src/index.js#L47)
> Constructor that gives you methods.
Constructor that gives you methods.

**Returns**
- `Object` instance of `Docks`
Expand Down
1 change: 0 additions & 1 deletion docs/_config.yml

This file was deleted.

10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"license": "Apache-2.0",
"licenseStart": "2018",
"scripts": {
"predocs": "yarn build",
"docs": "node dist/cli.js 'src/**/*' && verb",
"predocs": "rm -rf docs && yarn build",
"docs": "node dist/cli.js 'src/**/*' --outfile docs/API.md && verb",
"lint": "eslint src test --fix --format codeframe",
"test": "asia -r esm -u",
"cov": "nyc --require esm asia",
"test": "nyc --require esm asia",
"prebuild": "rm -rf dist && mkdir dist",
"build": "ascjs src dist",
"gitadd": "git status --porcelain && git add -A",
Expand Down Expand Up @@ -85,8 +84,7 @@
"toc": {
"render": true,
"method": "preWrite",
"maxdepth": 4,
"footer": ""
"maxdepth": 4
},
"layout": "empty",
"tasks": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const DEFAULT_OPTIONS = {
};

/**
* > Constructor that gives you methods.
* Constructor that gives you methods.
*
* @name docks
* @returns {Object} instance of `Docks`
Expand Down
11 changes: 7 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import path from 'path';
import proc from 'process';
import test from 'asia';
import docks from '../src';

const app = docks();

test('foo bar', (t) => {
const cmts = app.parse('str');
console.log(cmts.length);
t.ok(true);
test('todo tests', async (t) => {
const filepath = path.join(proc.cwd(), 'src', 'plugins', 'render.js');
const text = await app.renderFile(filepath);
// console.log(text)
t.ok(text);
});
2 changes: 1 addition & 1 deletion test/snapshots/index.snapshot.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"foo bar":{"skip":false,"todo":false,"run":false,"isPending":false,"isRejected":false,"isFulfilled":true,"id":1,"str":"(t) => {\n const cmts = app.parse('str');\n _7cb‍.g.console.log(cmts.length);\n t.ok(true);\n}","title":"foo bar"}}
{"todo tests":{"skip":false,"todo":false,"run":false,"isPending":false,"isRejected":false,"isFulfilled":true,"id":1,"str":"async (t) => {\n const filepath = path.join(proc.cwd(), 'src', 'plugins', 'render.js');\n const text = await app.renderFile(filepath);\n // console.log(text)\n t.ok(text);\n}","title":"todo tests"}}

0 comments on commit 281af7b

Please sign in to comment.