Skip to content

Commit

Permalink
Env 使用《死亡构建》
Browse files Browse the repository at this point in the history
  • Loading branch information
E0SelmY4V committed Mar 19, 2023
1 parent 0156d4d commit 770f9d1
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 41 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

**/node_modules
package-lock.json

/temp
build
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@

## 安装

你可以通过直接 clone 本项目来使用
### 通过网站下载

```bash
git clone https://github.com/E0SelmY4V/changerf.git
```
你可以通过直接下载 [GitHub 上的发行包](https://github.com/E0SelmY4V/changerf/releases) 来安装。

也可以选择使用 npm 等包管理器安装本项目
### 通过 npm 下载

你也可以选择使用 npm 等包管理器安装本项目。

```bash
npm i changerf
Expand Down Expand Up @@ -91,11 +91,3 @@ console.log(curve); // 输出以便欣赏数组
## 使用感受

- 看起来挺炫酷。

## 关于文档

本项目无文档,但是本项目代码有注释。

注释不清楚的可以 [邮箱]([email protected]) 联系我。

想免费给我写文档也可 [邮箱]([email protected]) 联系我。或者有不要的钱送给我也可以。
17 changes: 0 additions & 17 deletions build/do.js

This file was deleted.

5 changes: 0 additions & 5 deletions build/global.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion build/head

This file was deleted.

1 change: 0 additions & 1 deletion build/main.js

This file was deleted.

1 change: 0 additions & 1 deletion build/tail

This file was deleted.

27 changes: 27 additions & 0 deletions dobuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const {
snake,
exec,
outFS,
timeEnd,
time,
log,
dels,
cps,
goodReg,
comp,
} = require('lethal-build')(__dirname);

snake(
dels('build'),
cps(['lib', 'build']),
dels(RegExp(`^${goodReg(comp('build'))}.*js`)),
exec('npm exec webpack'),
outFS([
[1, '!function(exp){'],
[0, 'build/temp.js'],
[1, `}(typeof module!=='undefined'&&module)`],
], 'build/main.js'),
dels('build/temp.js'),
timeEnd(),
log('Built in', time(), 'ms')
);
9 changes: 9 additions & 0 deletions lib/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare global {
/**
* 『高级平滑渐变色』函数库
* @version 0.9.0
*/
var ChangeRF: typeof import('./main').ChangeRF;
}

export { };
4 changes: 2 additions & 2 deletions build/main.d.ts → lib/main.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as ChangeRF from '../lib'
import * as ChangeRF from '.'
/**『高级平滑渐变色』函数库 */
declare module "changerf"
declare module "."
export default ChangeRF
export { ChangeRF }
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "build/main.js",
"scripts": {
"test-build": "npm run build",
"build": "node ./build/do.js",
"build": "node dobuild",
"test-b": "start ./test/browser.html",
"test-i": "node ./test/ie.js",
"test-nc": "node ./test/node.cjs",
Expand All @@ -14,6 +14,11 @@
"test-wc": "webpack ./test/webpack.cjs -c ./test/webpack.config.js & start ./test/webpack.html",
"test-wm": "webpack ./test/webpack.mjs -c ./test/webpack.config.js & start ./test/webpack.html"
},
"files": [
"build",
"LICENSE",
"README.md"
],
"repository": {
"type": "git",
"url": "git+https://github.com/E0SelmY4V/changerf.git"
Expand All @@ -35,6 +40,7 @@
"devDependencies": {
"jexpt": "^1.2.4",
"webpack": "",
"lethal-build": "^1.3.2",
"ie-passer": "^1.3.4"
}
}

0 comments on commit 770f9d1

Please sign in to comment.