Skip to content

Commit

Permalink
updates based on work with markdown-it-chords
Browse files Browse the repository at this point in the history
  • Loading branch information
dnotes committed Jun 4, 2020
1 parent d35f1c2 commit 5df5eb9
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 3,212 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.yml
Expand Up @@ -28,15 +28,15 @@ rules:
guard-for-in: 2
handle-callback-err: 2

indent: [ 2, 2, { VariableDeclarator: { var: 2, let: 2, const: 3 }, SwitchCase: 1 } ]
indent: [ 1, "tab", { VariableDeclarator: { var: 2, let: 2, const: 3 }, SwitchCase: 1 } ]

# key-spacing: [ 2, { "align": "value" } ]
keyword-spacing: 2
linebreak-style: 2
max-depth: [ 1, 6 ]
max-nested-callbacks: [ 1, 4 ]
# string can exceed 80 chars, but should not overflow github website :)
max-len: [ 2, 120, 1000 ]
max-len: [ 2, 120, 2 ]
new-cap: 2
new-parens: 2
# Postponed
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
@@ -1,3 +1,7 @@
# lock files
package-lock.json
yarn.lock

# Logs
logs
*.log
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -40,6 +40,9 @@ build:
> dist/${NPM_PACKAGE}.min.js

publish:
npm run lint || exit $$?
npm run test || exit $$?
make build
@if test 0 -ne `git status --porcelain | wc -l` ; then \
echo "Unclean working tree. Commit or stash changes first." >&2 ; \
exit 128 ; \
Expand All @@ -52,7 +55,7 @@ publish:
echo "Tag ${NPM_VERSION} exists. Update package.json" >&2 ; \
exit 128 ; \
fi
git tag ${NPM_VERSION} && git push ${REMOTE_NAME} ${NPM_VERSION}
git tag ${NPM_VERSION} && git push ${REMOTE_NAME} ${NPM_VERSION} || exit $$?

.PHONY: publish browserify config
.SILENT: config
9 changes: 9 additions & 0 deletions dist/markdown-it-base.js
@@ -0,0 +1,9 @@
/*! markdown-it-base 1.0.0 @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownItBase = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
'use strict'

module.exports = function plugin(md) {
return md
}

},{}]},{},[1])(1)
});
1 change: 1 addition & 0 deletions dist/markdown-it-base.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js
@@ -1,5 +1,5 @@
'use strict'

module.exports = function plugin(md) {
return md
return md
}
5 changes: 1 addition & 4 deletions package.json
Expand Up @@ -7,7 +7,6 @@
"build": "make build",
"coverage": "yarn test && nyc report -r text-lcov | coveralls",
"lint": "eslint .",
"pub": "yarn lint && yarn test && make build && make publish",
"test": "nyc --check-coverage --lines 100 mocha"
},
"keywords": [
Expand All @@ -18,14 +17,12 @@
"license": "MIT",
"devDependencies": {
"browserify": "^16.2.3",
"coveralls": "^3.0.3",
"eslint": "^5.16.0",
"markdown-it": "^8.4.2",
"markdown-it-testgen": "^0.1.5",
"mocha": "^6.1.4",
"nyc": "^14.1.1",
"terser": "^3.17.0"
},
"dependencies": {
"coveralls": "^3.0.3"
}
}
4 changes: 2 additions & 2 deletions test/test.js
Expand Up @@ -6,6 +6,6 @@ var generate = require('markdown-it-testgen')
/*eslint-env mocha*/

describe('Tests for markdown-it plugin', function () {
var md = require('markdown-it')().use(require('../'))
generate(path.join(__dirname, 'fixtures/definitions.txt'), { header: true }, md)
var md = require('markdown-it')().use(require('../'))
generate(path.join(__dirname, 'fixtures/definitions.txt'), { header: true }, md)
})

0 comments on commit 5df5eb9

Please sign in to comment.