You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+2-42Lines changed: 2 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,8 @@
1
-
# This is a project help you build userscript with webpack
1
+
# MetaTranslator
2
+
This is a project help you build userscript with webpack
2
3
3
4
Just [use this git repo as a template](https://github.com/Trim21/webpack-userscript-template/generate).
4
5
5
-
[中文说明](./readme.cn.md)
6
-
7
-
## dev
8
-
9
-
1. Allow Tampermonkey's access to local file URIs [tampermonkey/faq](https://tampermonkey.net/faq.php?ext=dhdg#Q204)
10
-
2. install deps with `npm i` or `npm ci`.
11
-
3.`npm run dev` to start your development.
12
-
13
-
Now you will see 2 files in `./dist/`
14
-
15
-
-`dist/index.dev.user.js`: **You should install this userscript in your browser.** It's a simple loader that load `dist/index.debug.js` on matched web page.
16
-
-`dist/index.debug.js`: This is the development build with `eval-source-map`. It will be automatically loaded by `dist/index.dev.user.js` via `@require file://.../dist/index.debug.js` metadata, **Don't add it to your userscript manager.**
17
-
18
-
4. edit [src/index.ts](./src/index.ts), you can even import css or less files. You can use scss if you like.
19
-
5. go wo <https://www.example.com/> and open console, you'll see it's working.
20
-
21
-
livereload is default enabled, use [this Chrome extension](https://chrome.google.com/webstore/detail/jnihajbhpnppcggbcgedagnkighmdlei)
22
-
23
-
### NOTICE
24
-
25
-
Everytime you change your metadata config,
26
-
you'll have to restart webpack server and install newly generated `dist/index.dev.user.js` UserScript in your browser again.
27
-
28
-
## used package
29
-
30
-
If you prefer some other bundler like rollup, you can use some of these packages directly.
0 commit comments