Skip to content

Commit 764012f

Browse files
author
sifan
committed
fix: 移除esm 模块,解决vue 不同版本存在的export 不同的问题
1 parent d48429e commit 764012f

File tree

8 files changed

+12727
-149
lines changed

8 files changed

+12727
-149
lines changed

.github/workflows/release-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
node-version: '12.x'
1515
registry-url: https://registry.npmjs.org/
1616
- run: npm ci
17-
- run: npm run build
17+
- run: npm run build && npx gulp
1818
- run: npm publish
1919
env:
2020
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

Gulpfile.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const { src, dest, series } = require('gulp');
2+
const jsonEditor = require("gulp-json-editor");
3+
const { Reflect } = require('core-js');
4+
const { merge } = require('lodash-es');
5+
6+
const foldPath = './';
7+
8+
function package() {
9+
return src("package.json")
10+
.pipe(jsonEditor(function(json) {
11+
const existJson = {
12+
scripts: {
13+
test: 'echo "Error: no test specified" && exit 1'
14+
}
15+
};
16+
const tmpJson = merge(json, existJson);
17+
18+
Reflect.deleteProperty(tmpJson, 'devDependencies');
19+
Reflect.deleteProperty(tmpJson.dependencies, 'vue');
20+
Reflect.deleteProperty(tmpJson.dependencies, 'core-js');
21+
22+
return tmpJson;
23+
})).pipe(dest(foldPath));
24+
}
25+
26+
exports.default = series(package)

build/rollup.config.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

dist/vue3-count-to.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)