Skip to content

Commit

Permalink
feat(build): use yarn again
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Mar 28, 2019
1 parent 4b27082 commit 9ff078c
Show file tree
Hide file tree
Showing 17 changed files with 6,776 additions and 6,012 deletions.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Official Docute Plugins

- [@leptosia/docute-mermaid](./packages/mermaid)
- [@leptosia/docute-google-analytics](./packages/google-analytics)
- [@leptosia/docute-katex](./packages/katex)
- [@leptosia/docute-run-code](./packages/run-code)
- [docute-mermaid](./packages/mermaid)
- [docute-google-analytics](./packages/google-analytics)
- [docute-katex](./packages/katex)
- [docute-run-code](./packages/run-code)

## Community Plugins

Expand All @@ -18,28 +18,35 @@

```json
{
"name": "@leptosia/docute-foo",
"name": "docute-foo",
"version": "0.0.0",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "bili",
"prepublishOnly": "npm run build"
"prepublishOnly": "yarn build"
},
"main": "dist/index.js",
"main": "dist/index.min.js",
"files": [
"dist"
],
"license": "MIT",
"devDependencies": {
"bili": "^3.1.2"
},
"bili": {
"filename": "index.js",
"name": "docuteFoo",
"format": ["umd", "umd-min"]
"bili": "^4.7.2"
}
}
```
3. Create a `bili.config.ts` with following contents:

```ts
import {Config} from 'bili'

const config: Config = {
output: {
fileName: 'index[min].js',
format: ['umd', 'umd-min'],
moduleName: '{{ replace this with moduleName }}'
}
}

export default config
```
3. Create `src/index.js`
4. Create `src/index.js`
Empty file removed bili.config.ts
Empty file.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
"name": "docute-plugins",
"version": "1.0.0",
"license": "MIT",
"workspaces": ["packages/*"]
"workspaces": [
"packages/*"
],
"devDependencies": {
"lerna": "^3.13.1"
}
}
4 changes: 2 additions & 2 deletions packages/google-analytics/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @leptosia/docute-google-analytics
# docute-google-analytics

Using Google Analytics in Docute.

Expand All @@ -8,7 +8,7 @@ First load this plugin via `<script>` tag:

```html
<!-- Load these after docute.js -->
<script src="https://cdn.jsdelivr.net/npm/@leptosia/docute-google-analytics@1/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docute-google-analytics@1/dist/index.min.js"></script>
```

This plugin is exposed as `window.docuteGoogleAnalytics`:
Expand Down
11 changes: 11 additions & 0 deletions packages/google-analytics/bili.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {Config} from 'bili'

const config: Config = {
output: {
fileName: 'index[min].js',
format: ['umd', 'umd-min'],
moduleName: 'docuteGoogleAnalytics'
}
}

export default config
23 changes: 5 additions & 18 deletions packages/google-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
{
"name": "@leptosia/docute-google-analytics",
"name": "docute-google-analytics",
"version": "1.0.0",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "bili",
"prepublishOnly": "npm run build"
"prepublishOnly": "yarn build"
},
"main": "dist/index.js",
"main": "dist/index.min.js",
"files": [
"dist"
],
"license": "MIT",
"devDependencies": {
"bili": "^3.1.2"
},
"bili": {
"filename": "index.js",
"name": "docuteGoogleAnalytics",
"format": [
"umd",
"umd-min"
]
},
"dependencies": {
"vue-ga": "^1.0.0"
"bili": "^4.7.2",
"vue-ga": "^1.1.0"
}
}
4 changes: 2 additions & 2 deletions packages/katex/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @leptosia/docute-katex
# docute-katex

Using [Katex](https://katex.org/) (The fastest math typesetting library for the web) in Docute.

Expand All @@ -12,7 +12,7 @@ First load this plugin via `<script>` tag:

<!-- Load the scripts after docute.js -->
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/katex.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@leptosia/docute-katex@1/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docute-katex@1/dist/index.min.js"></script>
```

This plugin is exposed as `window.docuteKatex`:
Expand Down
11 changes: 11 additions & 0 deletions packages/katex/bili.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {Config} from 'bili'

const config: Config = {
output: {
fileName: 'index[min].js',
format: ['umd', 'umd-min'],
moduleName: 'docuteKatex'
}
}

export default config
19 changes: 4 additions & 15 deletions packages/katex/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
{
"name": "@leptosia/docute-katex",
"name": "docute-katex",
"version": "1.0.1",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "bili",
"prepublishOnly": "npm run build"
"prepublishOnly": "yarn build"
},
"main": "dist/index.js",
"main": "dist/index.min.js",
"files": [
"dist"
],
"license": "MIT",
"devDependencies": {
"bili": "^3.1.2"
},
"bili": {
"filename": "index.js",
"name": "docuteKatex",
"format": [
"umd",
"umd-min"
]
"bili": "^4.7.2"
}
}
4 changes: 2 additions & 2 deletions packages/mermaid/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @leptosia/docute-mermaid
# docute-mermaid

Using Mermaid in Docute.

Expand All @@ -9,7 +9,7 @@ First load this plugin via `<script>` tag:
```html
<!-- Load these after docute.js -->
<script src="https://cdn.jsdelivr.net/npm/mermaid@8.0.0-rc.8/dist/mermaid.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@leptosia/docute-mermaid@1/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docute-mermaid@1/dist/index.min.js"></script>
```

This plugin is exposed as `window.docuteMermaid`:
Expand Down
11 changes: 11 additions & 0 deletions packages/mermaid/bili.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {Config} from 'bili'

const config: Config = {
output: {
fileName: 'index[min].js',
format: ['umd', 'umd-min'],
moduleName: 'docuteMermaid'
}
}

export default config
19 changes: 4 additions & 15 deletions packages/mermaid/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
{
"name": "@leptosia/docute-mermaid",
"name": "docute-mermaid",
"version": "1.0.4",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "bili",
"prepublishOnly": "npm run build"
"prepublishOnly": "yarn build"
},
"main": "dist/index.js",
"main": "dist/index.min.js",
"files": [
"dist"
],
"license": "MIT",
"devDependencies": {
"bili": "^3.1.2"
},
"bili": {
"filename": "index.js",
"name": "docuteMermaid",
"format": [
"umd",
"umd-min"
]
"bili": "^4.7.2"
}
}
4 changes: 2 additions & 2 deletions packages/run-code/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @leptosia/docute-run-code
# docute-run-code

Run code fences in your markdown.

Expand All @@ -8,7 +8,7 @@ First load this plugin via `<script>` tag:

```html
<!-- Load these after docute.js -->
<script src="https://cdn.jsdelivr.net/npm/@leptosia/docute-run-code@1/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docute-run-code@1/dist/index.min.js"></script>
```

This plugin is exposed as `window.docuteRunCode`:
Expand Down
11 changes: 11 additions & 0 deletions packages/run-code/bili.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {Config} from 'bili'

const config: Config = {
output: {
fileName: 'index[min].js',
format: ['umd', 'umd-min'],
moduleName: 'docuteRunCode'
}
}

export default config
Loading

0 comments on commit 9ff078c

Please sign in to comment.