Skip to content

Commit eb945c5

Browse files
committed
edit README
1 parent 2d8fdbd commit eb945c5

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

README.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Template repo using Webpack and TypeScript to build your userscript for Tampermo
44

55
Automatically generate headers from your package.json!
66

7-
## Useage (two-ways)
7+
## Usage
88

9-
### 1. Generate repostiory from template or clone it
9+
### 1. Generate repostiory (two-ways)
1010

1111
#### - Use this template to create your new repository
1212

@@ -23,20 +23,23 @@ $ git clone https://github.com/pboymt/userscript-typescript-template.git
2323

2424
### Development
2525

26-
1. Allow Tampermonkey's access to local file URIs. ([Tampermonkey FAQs](https://tampermonkey.net/faq.php?ext=dhdg#Q204))
27-
2. Install dependencies with `npm install` or `npm ci`.
28-
3. Write `userscript` settings in package.json, you can refer to the comments in [plugins/userscript.plugin.ts](./plugins/userscript.plugin.ts).
29-
4. Code your userscript in `src` directory (like [src/index.ts](./src/index.ts)).
30-
5. Generate userscript with `npm run build`.
31-
6. Import generated userscript to Tampermonkey by local file URI.
26+
1. Install dependencies with `npm install` or `npm ci`.
27+
2. Edit settings in `userscript` object in [`package.json`](./package.json), you can refer to the comments in [`plugins/userscript.plugin.ts`](./plugins/userscript.plugin.ts).
28+
3. Code your userscript in `src` directory (like [`src/index.ts`](./src/index.ts)).
29+
4. Generate userscript with `npm run build`.
30+
5. Import generated userscript to Tampermonkey by local file URI.
3231

33-
### Use other file types
32+
### Compile other file types
3433

3534
You need install other loader plugins to support other file types.
3635

37-
For example, you can use `scss-loader` to compile `.scss` files. Install it with `npm install --save-dev scss-loader node-sass` and add it in [webpack.config.ts](./webpack.config.ts).
36+
For example, you can use `scss-loader` to compile `.scss` files. Install it with `npm install --save-dev scss-loader node-sass` and add it in [`webpack.config.ts`](./webpack.config.ts).
3837

39-
### After
38+
### Debug
39+
40+
Allow Tampermonkey's access to local file URIs ([Tampermonkey FAQs](https://tampermonkey.net/faq.php?ext=dhdg#Q204)) and import built userscript's file URL.
41+
42+
### Publish you userscript
4043

4144
You can publish your userscript to [Greasy Fork](https://greasyfork.org/) or other websites.
4245

0 commit comments

Comments
 (0)