mirror of
https://github.com/kuohuanhuan/x-markdown-css.git
synced 2024-11-25 06:18:19 +00:00
Compare commits
37 Commits
v0.0.0-202
...
v0.0.1-pat
Author | SHA1 | Date | |
---|---|---|---|
f988a9dddb
|
|||
3f5fc5f93b
|
|||
1b2245bab9
|
|||
7b50254f83
|
|||
5f9424617e
|
|||
f169a6c49a
|
|||
ba62d6e364
|
|||
d7c5188b7d
|
|||
de8b9d621c
|
|||
8bb74891ce
|
|||
d33f046030
|
|||
bd8d8822e5
|
|||
d9678940f2
|
|||
706720b8fe
|
|||
ff06dee900
|
|||
80ccac3dd1
|
|||
229680ca85
|
|||
e3fcf96559
|
|||
c77fbd21ae
|
|||
a4f5996f04
|
|||
cb009147b9
|
|||
188ac468fd
|
|||
24056e42d5
|
|||
274fc0fb31
|
|||
e83212e00f
|
|||
40a50968ed
|
|||
1a62e1258e
|
|||
648738b890
|
|||
7dc2238fdf
|
|||
65b4b24002
|
|||
94e8477077
|
|||
4bbc199636
|
|||
fd57e4bc4f
|
|||
ab38a24a75
|
|||
93e2f86137
|
|||
e622185bbf
|
|||
78cf02d7b8
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -11,7 +11,7 @@ on:
|
||||
jobs:
|
||||
# Test Lint
|
||||
lint:
|
||||
# Use Ubuntu 22.04
|
||||
# Use Ubuntu 22.04 LTS
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
# Step I
|
||||
@ -62,4 +62,4 @@ jobs:
|
||||
path: dist/
|
||||
retention-days: 3
|
||||
|
||||
# Authored by KuoHuanHuan.
|
||||
# Authored by @kuohuanhuan.
|
||||
|
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
jobs:
|
||||
# NPM Registry & GitHub Release
|
||||
release:
|
||||
# Use Ubuntu 22.04
|
||||
# Use Ubuntu 22.04 LTS
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
# Step I
|
||||
@ -29,10 +29,12 @@ jobs:
|
||||
- name: Build Project
|
||||
run: npm run build
|
||||
# Step V
|
||||
- uses: vimtor/action-zip@v1
|
||||
- name: Create tar.gz File
|
||||
uses: TheDoctor0/zip-release@0.7.1
|
||||
with:
|
||||
files: dist/
|
||||
dest: build.zip
|
||||
type: tar
|
||||
path: dist/*
|
||||
filename: build.tar.gz
|
||||
# Step VI
|
||||
- name: Publish to NPM Registry
|
||||
uses: rxfork/npm-publish@v1
|
||||
@ -44,11 +46,23 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Step VIII
|
||||
- name: GitHub Release
|
||||
# / pre-release
|
||||
- name: GitHub Release (pre-release)
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
prerelease: true
|
||||
files: |
|
||||
dist/*
|
||||
build.zip
|
||||
build.tar.gz
|
||||
# / release
|
||||
- name: GitHub Release (release)
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-') == false
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
prerelease: false
|
||||
files: |
|
||||
dist/*
|
||||
build.tar.gz
|
||||
|
||||
# Authored by KuoHuanHuan.
|
||||
# Authored by @kuohuanhuan.
|
||||
|
@ -1,3 +1,4 @@
|
||||
build.tar.gz
|
||||
node_modules/
|
||||
.github/
|
||||
.vscode/
|
||||
|
@ -29,7 +29,10 @@ module.exports = (grunt) ->
|
||||
exp:
|
||||
options:
|
||||
processors: [
|
||||
require('postcss-preset-env')()
|
||||
require('postcss-preset-env')(
|
||||
features:
|
||||
'custom-properties': false
|
||||
)
|
||||
require('autoprefixer')()
|
||||
]
|
||||
src: 'dist/bundle.css'
|
||||
@ -37,7 +40,10 @@ module.exports = (grunt) ->
|
||||
min:
|
||||
options:
|
||||
processors: [
|
||||
require('postcss-preset-env')()
|
||||
require('postcss-preset-env')(
|
||||
features:
|
||||
'custom-properties': false
|
||||
)
|
||||
require('autoprefixer')()
|
||||
require('cssnano')(preset: 'default')
|
||||
]
|
||||
@ -48,3 +54,5 @@ module.exports = (grunt) ->
|
||||
'sass'
|
||||
'postcss'
|
||||
]
|
||||
|
||||
# Authored by @kuohuanhuan.
|
||||
|
70
README.md
70
README.md
@ -10,17 +10,61 @@
|
||||
|
||||
> A simple and customizable markdown CSS stylesheet for everyone.
|
||||
|
||||
## Requirement
|
||||
## Browsers Support
|
||||
|
||||
According to [.browserslistrc](https://github.com/kuohuanhuan/x-markdown-css/blob/master/.browserslistrc), `x-markdown-css` supports **all browsers support CSS variables.**
|
||||
|
||||
## Usage
|
||||
|
||||
You can use `x-markdown-css` with:
|
||||
|
||||
1. A CDN service:
|
||||
|
||||
- UNPKG: `https://unpkg.com/x-markdown-css@latest/dist/bundle.min.css`
|
||||
- jsDelivr: `https://fastly.jsdelivr.net/npm/x-markdown-css@latest/dist/bundle.min.css`
|
||||
- CDNJS: *Coming soon. **Waiting for you to make `x-markdown-css` [popular enough](https://github.com/cdnjs/packages/blob/master/CONTRIBUTING.md#policy-rules-and-guidelines)**!*
|
||||
|
||||
> *ps. `bundle.css` without `.min` stands for unminified version.*
|
||||
|
||||
2. A Sass / SCSS project
|
||||
|
||||
First, install it with NPM ([PNPM](https://pnpm.io) or [Yarn](https://yarnpkg.com) also works):
|
||||
|
||||
```sh
|
||||
npm i x-markdown-css@latest
|
||||
```
|
||||
|
||||
Then, add it to your Sass / SCSS file (SCSS for example):
|
||||
|
||||
```scss
|
||||
@import 'x-markdown-css';
|
||||
```
|
||||
|
||||
> *ps. No path or file extention is required, just simply use `x-markdown-css` to import it.*
|
||||
|
||||
## Uses
|
||||
|
||||
- [SCSS](https://sass-lang.com)
|
||||
- [Stylelint](https://stylelint.io)
|
||||
- [Grunt](https://gruntjs.com)
|
||||
- [PostCSS](https://postcss.org)
|
||||
- [cssnano](https://cssnano.co)
|
||||
|
||||
*...and much more.*
|
||||
|
||||
## Development
|
||||
|
||||
### Requirement
|
||||
|
||||
- Node.js >= 16
|
||||
|
||||
## Install
|
||||
### Install
|
||||
|
||||
```sh
|
||||
npm i
|
||||
```
|
||||
|
||||
## Build
|
||||
### Build
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
@ -38,26 +82,6 @@ or
|
||||
npx grunt build
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
You can use the minified CSS file with a CDN service:
|
||||
|
||||
- UNPKG: `https://unpkg.com/x-markdown-css@latest/dist/bundle.min.css`
|
||||
- jsDelivr: `https://fastly.jsdelivr.net/npm/x-markdown-css@latest/dist/bundle.min.css`
|
||||
- CDNJS: *Coming soon. **Waiting for you to make `x-markdown-css` [popular enough](https://github.com/cdnjs/packages/blob/master/CONTRIBUTING.md#policy-rules-and-guidelines)**!*
|
||||
|
||||
> *ps. `bundle.css` without `.min` stands for unminified version.*
|
||||
|
||||
## Uses
|
||||
|
||||
- [SCSS](https://sass-lang.com)
|
||||
- [Stylelint](https://stylelint.io)
|
||||
- [Grunt](https://gruntjs.com)
|
||||
- [PostCSS](https://postcss.org)
|
||||
- [cssnano](https://cssnano.co)
|
||||
|
||||
*...and much more.*
|
||||
|
||||
## Contributing
|
||||
|
||||
PRs, issues and feature requests are welcome!
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "x-markdown-css",
|
||||
"version": "0.0.0-20230302.10",
|
||||
"version": "0.0.1-patch.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "x-markdown-css",
|
||||
"version": "0.0.0-20230302.10",
|
||||
"version": "0.0.1-patch.3",
|
||||
"description": "A simple and customizable markdown CSS stylesheet for everyone.",
|
||||
"keywords": [
|
||||
"markdown",
|
||||
@ -16,7 +16,8 @@
|
||||
"article",
|
||||
"documentation"
|
||||
],
|
||||
"main": "index.js",
|
||||
"sass": "src/index.scss",
|
||||
"style": "dist/bundle.min.css",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kuohuanhuan/x-markdown-css.git"
|
||||
|
@ -36,7 +36,8 @@
|
||||
}
|
||||
hr {
|
||||
width: 50px;
|
||||
margin: 2rem auto;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
blockquote,
|
||||
q {
|
||||
@ -95,7 +96,7 @@ html:not(.dark) .shiki-dark,
|
||||
&:hover,
|
||||
&:focus {
|
||||
.header-anchor {
|
||||
opacity: .5;
|
||||
opacity: .35 + $i * .025;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user