Skip to content

Commit ab5225e

Browse files
authored
Release: 0.2.0 (#62)
* Add an image to test * Tests and dev files to npmignore * Set rc1, require directory to be clean * Add changelog * Eslint * Installation options
1 parent e8c8204 commit ab5225e

File tree

10 files changed

+295
-8
lines changed

10 files changed

+295
-8
lines changed

.eslintrc.yml

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
env:
2+
browser: true
3+
commonjs: true
4+
es6: true
5+
extends: 'eslint:recommended'
6+
globals:
7+
Atomics: readonly
8+
SharedArrayBuffer: readonly
9+
parserOptions:
10+
ecmaVersion: 2018
11+
rules:
12+
accessor-pairs: error
13+
array-bracket-newline: error
14+
array-bracket-spacing:
15+
- error
16+
- never
17+
array-callback-return: error
18+
array-element-newline: error
19+
arrow-body-style: error
20+
arrow-parens: error
21+
arrow-spacing: error
22+
block-scoped-var: error
23+
block-spacing: error
24+
brace-style: 'off'
25+
callback-return: error
26+
camelcase: error
27+
capitalized-comments: 'off'
28+
class-methods-use-this: error
29+
comma-dangle: 'off'
30+
comma-spacing:
31+
- error
32+
- after: true
33+
before: false
34+
comma-style:
35+
- error
36+
- last
37+
complexity: error
38+
computed-property-spacing:
39+
- error
40+
- never
41+
consistent-return: 'off'
42+
consistent-this: error
43+
curly: 'off'
44+
default-case: error
45+
dot-location:
46+
- error
47+
- property
48+
dot-notation: error
49+
eol-last: error
50+
eqeqeq: error
51+
func-call-spacing: error
52+
func-name-matching: error
53+
func-names: 'off'
54+
func-style:
55+
- error
56+
- declaration
57+
function-paren-newline: error
58+
generator-star-spacing: error
59+
global-require: 'off'
60+
guard-for-in: error
61+
handle-callback-err: error
62+
id-blacklist: error
63+
id-length: 'off'
64+
id-match: error
65+
implicit-arrow-linebreak: error
66+
indent: 'off'
67+
indent-legacy: 'off'
68+
init-declarations: error
69+
jsx-quotes: error
70+
key-spacing: error
71+
keyword-spacing: 'off'
72+
line-comment-position: 'off'
73+
linebreak-style:
74+
- error
75+
- unix
76+
lines-around-comment: error
77+
lines-around-directive: 'off'
78+
lines-between-class-members: error
79+
max-classes-per-file: error
80+
max-depth: error
81+
max-len: 'off'
82+
max-lines: error
83+
max-lines-per-function: error
84+
max-nested-callbacks: error
85+
max-params: error
86+
max-statements: 'off'
87+
max-statements-per-line: error
88+
multiline-comment-style:
89+
- error
90+
- separate-lines
91+
new-cap: error
92+
new-parens: error
93+
newline-after-var: 'off'
94+
newline-before-return: 'off'
95+
newline-per-chained-call: 'off'
96+
no-alert: error
97+
no-array-constructor: error
98+
no-await-in-loop: error
99+
no-bitwise: error
100+
no-buffer-constructor: error
101+
no-caller: error
102+
no-catch-shadow: error
103+
no-confusing-arrow: error
104+
no-console: 'off'
105+
no-continue: error
106+
no-div-regex: error
107+
no-duplicate-imports: error
108+
no-else-return: error
109+
no-empty-function: 'off'
110+
no-eq-null: error
111+
no-eval: error
112+
no-extend-native: error
113+
no-extra-bind: error
114+
no-extra-label: error
115+
no-extra-parens: error
116+
no-floating-decimal: error
117+
no-implicit-coercion: error
118+
no-implicit-globals: error
119+
no-implied-eval: error
120+
no-inline-comments: 'off'
121+
no-invalid-this: error
122+
no-iterator: error
123+
no-label-var: error
124+
no-labels: error
125+
no-lone-blocks: error
126+
no-lonely-if: error
127+
no-loop-func: error
128+
no-magic-numbers: 'off'
129+
no-mixed-operators: error
130+
no-mixed-requires: 'off'
131+
no-multi-assign: error
132+
no-multi-spaces:
133+
- error
134+
- ignoreEOLComments: true
135+
no-multi-str: error
136+
no-multiple-empty-lines: error
137+
no-native-reassign: error
138+
no-negated-condition: error
139+
no-negated-in-lhs: error
140+
no-nested-ternary: error
141+
no-new: error
142+
no-new-func: error
143+
no-new-object: error
144+
no-new-require: error
145+
no-new-wrappers: error
146+
no-octal-escape: error
147+
no-param-reassign: error
148+
no-path-concat: 'off'
149+
no-plusplus: error
150+
no-process-env: 'off'
151+
no-process-exit: 'off'
152+
no-proto: error
153+
no-restricted-globals: error
154+
no-restricted-imports: error
155+
no-restricted-modules: error
156+
no-restricted-properties: error
157+
no-restricted-syntax: error
158+
no-return-assign: error
159+
no-return-await: error
160+
no-script-url: error
161+
no-self-compare: error
162+
no-sequences: error
163+
no-shadow: error
164+
no-spaced-func: error
165+
no-sync: 'off'
166+
no-tabs: error
167+
no-template-curly-in-string: error
168+
no-ternary: 'off'
169+
no-throw-literal: error
170+
no-trailing-spaces: error
171+
no-undef-init: error
172+
no-undefined: error
173+
no-underscore-dangle: error
174+
no-unmodified-loop-condition: error
175+
no-unneeded-ternary: error
176+
no-unused-expressions: error
177+
no-use-before-define: 'off'
178+
no-useless-call: error
179+
no-useless-computed-key: error
180+
no-useless-concat: error
181+
no-useless-constructor: error
182+
no-useless-rename: error
183+
no-useless-return: error
184+
no-var: error
185+
no-void: error
186+
no-warning-comments: error
187+
no-whitespace-before-property: error
188+
nonblock-statement-body-position: error
189+
object-curly-newline: error
190+
object-curly-spacing: 'off'
191+
object-shorthand: 'off'
192+
one-var: 'off'
193+
one-var-declaration-per-line: error
194+
operator-assignment:
195+
- error
196+
- always
197+
operator-linebreak: error
198+
padded-blocks: 'off'
199+
padding-line-between-statements: error
200+
prefer-arrow-callback: 'off'
201+
prefer-const: 'off'
202+
prefer-destructuring: 'off'
203+
prefer-named-capture-group: 'off'
204+
prefer-numeric-literals: error
205+
prefer-object-spread: error
206+
prefer-promise-reject-errors: error
207+
prefer-reflect: error
208+
prefer-rest-params: error
209+
prefer-spread: error
210+
prefer-template: 'off'
211+
quote-props: 'off'
212+
quotes: 'off'
213+
radix: error
214+
require-await: error
215+
require-jsdoc: 'off'
216+
require-unicode-regexp: 'off'
217+
rest-spread-spacing: error
218+
semi: 'off'
219+
semi-spacing: error
220+
semi-style:
221+
- error
222+
- last
223+
sort-imports: error
224+
sort-keys: 'off'
225+
sort-vars: 'off'
226+
space-before-blocks: 'off'
227+
space-before-function-paren: 'off'
228+
space-in-parens:
229+
- error
230+
- never
231+
space-infix-ops: 'off'
232+
space-unary-ops: error
233+
spaced-comment:
234+
- error
235+
- always
236+
strict: error
237+
switch-colon-spacing: error
238+
symbol-description: error
239+
template-curly-spacing:
240+
- error
241+
- never
242+
template-tag-spacing: error
243+
unicode-bom:
244+
- error
245+
- never
246+
valid-jsdoc: error
247+
vars-on-top: error
248+
wrap-iife: error
249+
wrap-regex: 'off'
250+
yield-star-spacing: error
251+
yoda:
252+
- error
253+
- never

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
## Provide the output of test command (required)
1313

14-
Run `npm test&; sleep 5; npm stop` or at least equivalent of `cat
15-
tests/test_math.md | instant-markdown-d --mathjax --debug` and paste the
14+
Run `npm test&; sleep 5; npm stop` or at least equivalent of
15+
`cd tests; cat test_math.md | instant-markdown-d --mathjax --debug` and paste the
1616
console output here:
1717

1818
```sh

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tests/
2+
.github/
3+
.travis.yml

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# 0.2.0.rc1 (2017-07-19)
2+
3+
* Optional MathJax support
4+
* Apache 2.0 license
5+
* Mount `__dirname` directory to serve images etc.
6+
* Browser port configuration
7+
* Debug option
8+
* Tests, CI
9+
* Issue template
10+
* ECMA6 upgrade, support only node>=8
11+
12+
# 0.1.1 (2017-07-19)
13+
14+
* Bug fix for windows

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ instant-markdown-d is a small Node.js server that enables instant compilation an
44

55
Installation
66
------------
7+
8+
Install the mini-server by running either:
9+
710
- `[sudo] npm -g install instant-markdown-d`
811

12+
or pre-release version
13+
14+
- `[sudo] npm -g install instant-markdown-d@next`
15+
16+
see [vim-instant-markdown](https://github.com/suan/vim-instant-markdown) for
17+
Vim / Neovim integration.
18+
919
REST API
1020
--------
1121
| Action | HTTP Method | Request URL | Request Body |

instant-markdown-d

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env node
22
"use strict";
3+
// node builtins
4+
const process = require('process');
5+
6+
37
const MarkdownIt = require('markdown-it');
48
const hljs = require('highlight.js');
59
const server = require('http').createServer(httpHandler),
@@ -30,7 +34,7 @@ Options:
3034
--mathjax Enable MathJax parsing
3135
--browser BROWSER Use a custom browser
3236
--port PORT Use a custom port (default: 8090)
33-
--debug Be verbose and do not open browser
37+
--debug Be verbose and do not open browser
3438
-V, --version Display version
3539
-h, --help Display help\
3640
`);

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"url": "git+https://github.com/suan/instant-markdown-d.git"
77
},
88
"description": "Instantly-updating Markdown Server",
9-
"version": "0.2.0",
9+
"version": "0.2.0-rc.1",
1010
"license": "Apache-2.0",
1111
"homepage": "https://github.com/suan/instant-markdown-d",
1212
"engines": {
@@ -20,8 +20,9 @@
2020
"scripts": {
2121
"start": "./instant-markdown-d",
2222
"build": "genversion ./version.js",
23-
"test": "cat tests/test_math.md | instant-markdown-d --mathjax --debug",
24-
"stop": "curl -X DELETE -s -w 'status: %{http_code}' -m 3 localhost:8090"
23+
"test": "cd tests; cat test_math.md | instant-markdown-d --mathjax --debug",
24+
"stop": "curl -X DELETE -s -w 'status: %{http_code}' -m 3 localhost:8090",
25+
"prepare": "npm run build; git clean -f;"
2526
},
2627
"dependencies": {
2728
"highlight.js": "^9.15.6",

tests/images/test_img.png

9.84 KB
Loading

tests/test_math.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
![](images/test_img.png)
2+
13
```python
24
import this
35
```
46

57
# Inline equations
68

7-
$\Sigma_{i=0}^\infty \frac{1}{n} = 2$ is a fact. However:
9+
$\Sigma_{i=0}^\infty \frac{1}{n} = 2$ is a fact. However:
810

911
$$\sin x = 12$$
1012

version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// generated by genversion
2-
module.exports = '0.2.0'
2+
module.exports = '0.2.0-rc.1'

0 commit comments

Comments
 (0)