|
1 |
| -# typescript-npm-package-template |
2 |
| - |
3 |
| -> Template to kickstart creating a Node.js module using TypeScript and VSCode |
4 |
| -
|
5 |
| -Inspired by [node-module-boilerplate](https://github.com/sindresorhus/node-module-boilerplate) |
6 |
| - |
7 |
| -## Features |
8 |
| - |
9 |
| -- [Semantic Release](https://github.com/semantic-release/semantic-release) |
10 |
| -- [Issue Templates](https://github.com/ryansonshine/typescript-npm-package-template/tree/main/.github/ISSUE_TEMPLATE) |
11 |
| -- [GitHub Actions](https://github.com/ryansonshine/typescript-npm-package-template/tree/main/.github/workflows) |
12 |
| -- [Codecov](https://about.codecov.io/) |
13 |
| -- [VSCode Launch Configurations](https://github.com/ryansonshine/typescript-npm-package-template/blob/main/.vscode/launch.json) |
14 |
| -- [TypeScript](https://www.typescriptlang.org/) |
15 |
| -- [Husky](https://github.com/typicode/husky) |
16 |
| -- [Lint Staged](https://github.com/okonet/lint-staged) |
17 |
| -- [Commitizen](https://github.com/search?q=commitizen) |
18 |
| -- [Jest](https://jestjs.io/) |
19 |
| -- [ESLint](https://eslint.org/) |
20 |
| -- [Prettier](https://prettier.io/) |
21 |
| - |
22 |
| -## Getting started |
23 |
| - |
24 |
| -### Set up your repository |
25 |
| - |
26 |
| -**Click the "Use this template" button.** |
27 |
| - |
28 |
| -Alternatively, create a new directory and then run: |
29 |
| - |
30 |
| -```bash |
31 |
| -curl -fsSL https://github.com/ryansonshine/typescript-npm-package-template/archive/main.tar.gz | tar -xz --strip-components=1 |
32 |
| -``` |
33 |
| - |
34 |
| -Replace `FULL_NAME`, `GITHUB_USER`, and `REPO_NAME` in the script below with your own details to personalize your new package: |
35 |
| - |
36 |
| -```bash |
37 |
| -FULL_NAME="John Smith" |
38 |
| -GITHUB_USER="johnsmith" |
39 |
| -REPO_NAME="my-cool-package" |
40 |
| -sed -i.mybak "s/ryansonshine/$GITHUB_USER/g; s/typescript-npm-package-template\|my-package-name/$REPO_NAME/g; s/Ryan Sonshine/$FULL_NAME/g" package.json package-lock.json README.md |
41 |
| -rm *.mybak |
42 |
| -``` |
43 |
| - |
44 |
| -### Add NPM Token |
45 |
| - |
46 |
| -Add your npm token to your GitHub repository secrets as `NPM_TOKEN`. |
47 |
| - |
48 |
| -### Add Codecov integration |
49 |
| - |
50 |
| -Enable the Codecov GitHub App [here](https://github.com/apps/codecov). |
51 |
| - |
52 |
| -**Remove everything from here and above** |
53 |
| - |
54 |
| ---- |
55 |
| - |
56 |
| -# my-package-name |
| 1 | +# notion-pull |
57 | 2 |
|
58 | 3 | [![npm package][npm-img]][npm-url]
|
59 | 4 | [![Build Status][build-img]][build-url]
|
60 |
| -[![Downloads][downloads-img]][downloads-url] |
61 |
| -[![Issues][issues-img]][issues-url] |
62 |
| -[![Code Coverage][codecov-img]][codecov-url] |
63 |
| -[![Commitizen Friendly][commitizen-img]][commitizen-url] |
64 |
| -[![Semantic Release][semantic-release-img]][semantic-release-url] |
65 |
| - |
66 |
| -> My awesome module |
67 | 5 |
|
68 | 6 | ## Install
|
69 | 7 |
|
70 | 8 | ```bash
|
71 |
| -npm install my-package-name |
| 9 | +npm install notion-pull |
72 | 10 | ```
|
73 | 11 |
|
74 | 12 | ## Usage
|
75 | 13 |
|
76 | 14 | ```ts
|
77 |
| -import { myPackage } from 'my-package-name'; |
| 15 | +import { notionPull } from 'notion-pull'; |
| 16 | + |
| 17 | +notionPull(process.env.MY_NOTION_TOKEN, "./docs","./static/notion_images"); |
78 | 18 |
|
79 |
| -myPackage('hello'); |
80 |
| -//=> 'hello from my package' |
81 | 19 | ```
|
82 | 20 |
|
83 | 21 | ## API
|
84 | 22 |
|
85 |
| -### myPackage(input, options?) |
86 |
| - |
87 |
| -#### input |
88 |
| - |
89 |
| -Type: `string` |
90 |
| - |
91 |
| -Lorem ipsum. |
92 |
| - |
93 |
| -#### options |
94 |
| - |
95 |
| -Type: `object` |
96 |
| - |
97 |
| -##### postfix |
98 |
| - |
99 |
| -Type: `string` |
100 |
| -Default: `rainbows` |
101 |
| - |
102 |
| -Lorem ipsum. |
103 |
| - |
104 |
| -[build-img]:https://github.com/ryansonshine/typescript-npm-package-template/actions/workflows/release.yml/badge.svg |
105 |
| -[build-url]:https://github.com/ryansonshine/typescript-npm-package-template/actions/workflows/release.yml |
106 |
| -[downloads-img]:https://img.shields.io/npm/dt/typescript-npm-package-template |
107 |
| -[downloads-url]:https://www.npmtrends.com/typescript-npm-package-template |
108 |
| -[npm-img]:https://img.shields.io/npm/v/typescript-npm-package-template |
109 |
| -[npm-url]:https://www.npmjs.com/package/typescript-npm-package-template |
110 |
| -[issues-img]:https://img.shields.io/github/issues/ryansonshine/typescript-npm-package-template |
111 |
| -[issues-url]:https://github.com/ryansonshine/typescript-npm-package-template/issues |
112 |
| -[codecov-img]:https://codecov.io/gh/ryansonshine/typescript-npm-package-template/branch/main/graph/badge.svg |
113 |
| -[codecov-url]:https://codecov.io/gh/ryansonshine/typescript-npm-package-template |
114 |
| -[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg |
115 |
| -[semantic-release-url]:https://github.com/semantic-release/semantic-release |
116 |
| -[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg |
117 |
| -[commitizen-url]:http://commitizen.github.io/cz-cli/ |
| 23 | +### notionPull(token, docs-destination-path, image-destination-path) |
0 commit comments