Skip to content

Commit

Permalink
feat(vue-amis-sdk@2.0.0-beta.2): 修复icon 图标丢失
Browse files Browse the repository at this point in the history
发布测试版
  • Loading branch information
h7ml committed Jul 4, 2022
1 parent 94fff71 commit fa165cb
Show file tree
Hide file tree
Showing 18 changed files with 11,362 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: pnpm install

- name: PNPM build
run: nr build
run: pnpm build

- name: Publish to NPM
run: pnpm -r publish --access public --no-git-checks
Expand Down
4 changes: 2 additions & 2 deletions examples/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</template>
<script>
import "amis-ui/lib/themes/cxd.css";
import "amis-ui/lib/themes/ang.css";
import "amis-editor/dist/style.css";
// import "amis-ui/lib/helper.css";
// import "../node_modules/amis-ui/lib/helper.css";
// import "../node_modules/amis-ui/lib/themes/antd.css";
export default {
name: 'App',
data() {
Expand Down
1 change: 0 additions & 1 deletion examples/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Vue from "vue";
import App from "./App.vue";
import VueAmisSdk from "./../packages/index";

Vue.use(VueAmisSdk);
console.log(VueAmisSdk);
import { VuePlugin } from "vuera";
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-amis-sdk",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"private": false,
"main": "sdk/vue-amis-sdk.umd.min.js",
"browser": "sdk/vue-amis-sdk.umd.min.js",
Expand Down Expand Up @@ -36,6 +36,7 @@
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
"@fortawesome/fontawesome-free": "^6.1.1",
"amis": "2.0.0",
"amis-editor": "4.2.0-beta.3",
"amis-formula": "^2.0.0",
Expand Down Expand Up @@ -80,8 +81,7 @@
"sass-loader": "^8.0.2",
"vue-eslint-parser": "8.0.1",
"vue-template-compiler": "^2.6.11",
"webpack": "4.46.0",
"webpackbar": "5.0.2"
"webpack": "4.46.0"
},
"author": {
"name": "h7ml",
Expand Down
1 change: 1 addition & 0 deletions packages/VueAmisSdk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ VueAmisSdk.install = function (Vue) {
};

export default VueAmisSdk;
window.VueAmisSdk = VueAmisSdk;
10 changes: 4 additions & 6 deletions packages/VueAmisSdk/src/VueAmisSdk.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
</div>
</template>
<script>
// import "amis/lib/themes/cxd.css";
// import "amis/lib/themes/ang.css";
// import "amis/lib/helper.css";
// import "amis/sdk/sdk.css";
// import "amis-editor/dist/style.css";
// fortawesome
import '@fortawesome/fontawesome-free/css/all.css';
import '@fortawesome/fontawesome-free/js/all'
import { Editor } from "amis-editor";
import { ReactInVue } from "vuera";
Expand All @@ -45,7 +43,7 @@ export default {
},
theme: {
type: String,
default: "ang",
default: "cxd",
},
className: {
type: String,
Expand Down
Binary file added sdk/fonts/fa-brands-400.7fa789ab.ttf
Binary file not shown.
Binary file added sdk/fonts/fa-brands-400.859fc388.woff2
Binary file not shown.
Binary file added sdk/fonts/fa-regular-400.2ffd018f.woff2
Binary file not shown.
Binary file added sdk/fonts/fa-regular-400.da02cb7e.ttf
Binary file not shown.
Binary file added sdk/fonts/fa-solid-900.3a463ec3.ttf
Binary file not shown.
Binary file added sdk/fonts/fa-solid-900.40ddefd7.woff2
Binary file not shown.
Binary file added sdk/fonts/fa-v4compatibility.924588dc.ttf
Binary file not shown.
5,615 changes: 5,608 additions & 7 deletions sdk/vue-amis-sdk.common.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions sdk/vue-amis-sdk.css

Large diffs are not rendered by default.

5,615 changes: 5,608 additions & 7 deletions sdk/vue-amis-sdk.umd.js

Large diffs are not rendered by default.

100 changes: 53 additions & 47 deletions sdk/vue-amis-sdk.umd.min.js

Large diffs are not rendered by default.

148 changes: 77 additions & 71 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,89 @@ const path = require("path");
const CompressionPlugin = require("compression-webpack-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const Webpack = require("webpack");
const pkg = require("./package.json");
const webpackBanner =
" project: vue-amis-sdk \n github https://github.com/h7ml/vue-amis-sdk \n author: h7ml(h7ml@qq.com) \n Time: ";
`project: vue-amis-sdk@${pkg.version} \n github https://github.com/h7ml/vue-amis-sdk \n author: h7ml(h7ml@qq.com) \n Time: `;
const dateTime = new Date();

function resolve(dir) {
return path.join(__dirname, "..", dir);
return path.join(__dirname, "..", dir);
}

const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')

module.exports = {
devServer: {
// development server port 8000
port: 3000,
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
proxy: {
'/amis': {
target: 'https://aisuda.bce.baidu.com/',
changeOrigin: true
},
'/api': {
target: 'https://preview.pro.antdv.com/',
changeOrigin: true
}
}
},
productionSourceMap: false,
pages: {
index: {
entry: "examples/main.js",
template: "public/index.html",
filename: "index.html",
},
},
configureWebpack: {
plugins: [
new MonacoWebpackPlugin()
]
},
chainWebpack: (config) => {
if (process.env.BUILD_TARGET === "lib") {
config.plugin("compressionPlugin").use(
new CompressionPlugin({
algorithm: "gzip", //开启gzip
test: /\.js$|\.html$|\.css/, // 匹配文件名
threshold: 2048, // 对超过10k的数据压缩
deleteOriginalAssets: false, // 不删除源文件
})
);
config.plugins.push(
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
drop_debugger: true, // 注释console
drop_console: true,
pure_funcs: ["console.log"], // 移除console
},
},
sourceMap: false,
parallel: true,
})
);
config.devtool = false;
config.externals = {
vue: "Vue",
axios: "axios",
amis: "amis",
"element-ui": "ELEMENT",
};
}
config.module
.rule("js")
.include.add(resolve("packages"))
.end()
.use("bable")
.loader("bable-loader")
.tap((options) => {
return options;
});
devServer: {
// development server port 8000
port: 3000,
// If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
proxy: {
'/amis': {
target: 'https://aisuda.bce.baidu.com/',
changeOrigin: true
},
'/api': {
target: 'https://preview.pro.antdv.com/',
changeOrigin: true
}
}
},
productionSourceMap: false,
pages: {
index: {
entry: "examples/main.js",
template: "public/index.html",
filename: "index.html",
},
},
configureWebpack: {
plugins: [
new MonacoWebpackPlugin(),
]
},
chainWebpack: (config) => {
if (process.env.BUILD_TARGET === "lib") {
config.plugin("compressionPlugin").use(
new CompressionPlugin({
algorithm: "gzip", //开启gzip
test: /\.js$|\.html$|\.css/, // 匹配文件名
threshold: 2048, // 对超过10k的数据压缩
deleteOriginalAssets: false, // 不删除源文件
})
);
config
.plugin('banner')
.use(Webpack.BannerPlugin, [`${webpackBanner}${dateTime}`])
config.plugins.push(
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
drop_debugger: true, // 注释console
drop_console: true,
pure_funcs: ["console.log"], // 移除console
},
},
sourceMap: false,
parallel: true,
})
);
config.devtool = false;
config.externals = {
vue: "Vue",
axios: "axios",
amis: "amis",
"element-ui": "ELEMENT",
};
}
config.module
.rule("js")
.include.add(resolve("packages"))
.end()
.use("bable")
.loader("bable-loader")
.tap((options) => {
return options;
});
},
};

0 comments on commit fa165cb

Please sign in to comment.