Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdify 1.0.11 #15

Merged
merged 4 commits into from
Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016-17 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)
Copyright (c) 2016-18 Ionică Bizău <bizauionica@gmail.com> (https://ionicabizau.net)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Have an idea? Found a bug? See [how to contribute][contributing].

## :sparkling_heart: Support my projects

I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously,
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,
this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
Expand Down
41 changes: 41 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { DumpOptions } from 'js-yaml';
import { ConverterOptions } from 'showdown';

export = mdify;

declare class mdify {

static parse(input: string, opts?: mdify.parseOptions): mdify.parseResult;

static parseFile(path: string, opts: mdify.parseOptions): mdify.parseResult;

static parseFile(path: string, opts: mdify.parseOptions, cb: (error: Error, result: mdify.parseResult) => void): void;

static stringify(metadata: any, content: string, options?: mdify.stringifyOptions): string;

static writeFile(path: string, metadata: any, content: string, options: mdify.stringifyOptions, cb: any): void;

}


declare namespace mdify {
type stringifyOptions = {
start?: string,
end?: string,
yamlOptions?: DumpOptions,
};

type parseOptions = {
start?: string,
end?: RegExp,
html?: boolean,
converterOptions?: ConverterOptions,
};

type parseResult = {
markdown: string,
metadata: any,
rawMeta: string,
html: string,
};
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"support"
],
"license": "MIT",
"version": "1.0.10",
"version": "1.0.11",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down Expand Up @@ -40,6 +41,8 @@
},
"homepage": "https://github.com/IonicaBizau/mdify#readme",
"dependencies": {
"@types/js-yaml": "^3.11.2",
"@types/showdown": "^1.7.5",
"js-yaml": "^3.6.1",
"read-utf8": "^1.2.3",
"showdown": "^1.4.1",
Expand Down
Loading