Skip to content

Commit

Permalink
💻 chore: 调整构建流程
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanDecode committed Jan 24, 2019
1 parent 858675e commit ec36dba
Show file tree
Hide file tree
Showing 763 changed files with 124 additions and 6,663 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/*
package-lock.json
temp/*
temp/*
build/*
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"editor.tabSize": 4,
"editor.insertSpaces": true
"editor.insertSpaces": true,
"liveSassCompile.settings.formats":[
// This is Default.
{
"format": "expanded",
"extensionName": ".css",
"savePath": null
}
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 AlanDecode
Copyright (c) 2019 AlanDecode

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
52 changes: 48 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@

## 开始使用

1. 下载压缩包:[点击下载](https://github.com/AlanDecode/Typecho-Theme-VOID/archive/master.zip)
### 安装

**方法一:使用构建好的版本(推荐)**

1. 到 Release 页面下载构建包:[点击前往](https://github.com/AlanDecode/Typecho-Theme-VOID/releases)
2. 解压
3. **把解压后的文件夹重命名为 VOID**
4. 检查文件夹名是否为 VOID,不是的话改成 VOID
Expand All @@ -37,11 +41,35 @@

可选:将主题 `assets` 文件夹下的 `VOIDCacheRule.js` 复制一份到站点根目录,以启用 Service Worker 缓存。

## 添加归档页面
**方法二:自己构建**

> 需要安装好 NodeJS
首先,clone 本仓库到本地:

```bash
git clone [email protected]:AlanDecode/Typecho-Theme-VOID.git ./VOID && cd ./VOID
```

然后安装依赖:

```bash
npm install
```

最后构建打包:

```bash
gulp build
```

到此时,新鲜的主题就出现在了 build 文件夹下,把 build 文件夹上传到主题目录,重命名为 VOID,然后启用即可。本方法使你可以使用到最新的主题,但是它可能包含未知问题,适合愿意折腾的人。

### 添加归档页面

新建独立页面,自定义模板选择 `Archives`,内容留空。

## 添加友情链接
### 添加友情链接

新建独立页面,然后如此书写:

Expand All @@ -65,7 +93,23 @@

## 更新

重复「开始使用」章节的 1-6 步,然后删除服务器上原来的主题文件夹,最后进行「开始使用」章节的第 7 步。期间不要禁用主题。
[开始使用](#开始使用),区别是你可以直接覆盖主题文件,不禁用主题,这样你的主题设置就不会丢失。

### 开发

如果你要定制自己的版本,首先按照[安装](#安装)中的方法二装好环境。然后:

```bash
gulp dev
```

这会将依赖打包,并监听 SCSS 更改然后实时编译。你可以添加自己想要的功能,满意后就提交代码吧。然后:

```bash
gulp build
```

构建你的主题。如果你对自己的更改很满意,**欢迎提出 Pull Request**

## 鸣谢

Expand Down
1 change: 0 additions & 1 deletion assets/VOID-287b9cae59.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/VOID-9f69f64eb4.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/assets/VOID.js → assets/VOID.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var VOID = {
logo: 'OωO',
container: document.getElementsByClassName('OwO')[0],
target: document.getElementsByClassName('input-area')[0],
api: '/usr/themes/VOID/assets/owo/OwO.json',
api: '/usr/themes/VOID/libs/assets/owo/OwO.json',
position: 'down',
width: '400px',
maxHeight: '250px'
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion assets/bundle-84083e4c24.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/bundle-edfc93f7bb.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/editor-ddc55de5c2.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/assets/editor.js → assets/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(function() {
logo: 'OωO',
container: document.getElementsByClassName('OwO')[0],
target: document.getElementById('text'),
api: '/usr/themes/VOID/assets/owo/OwO.json',
api: '/usr/themes/VOID/assets/libs/owo/OwO.json',
position: 'down',
width: '400px',
maxHeight: '250px'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions assets/libs/owo/OwO.json

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes
File renamed without changes
Loading

0 comments on commit ec36dba

Please sign in to comment.