Browse Source

添加单文件编译方式

master
Poised_flw 4 years ago
parent
commit
5e6fd9cb1b
  1. 1
      src/tis_app_template_kt/bus.min.js
  2. 7
      src/tis_app_template_kt/package.json
  3. 29
      src/tis_app_template_kt/rollup.config.js
  4. 28
      src/tis_app_template_kt/yarn.lock

1
src/tis_app_template_kt/bus.min.js
File diff suppressed because it is too large
View File

7
src/tis_app_template_kt/package.json

@ -5,7 +5,7 @@
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build:dev":"vue-cli-service build --mode dev",
"build:dev": "vue-cli-service build --mode dev",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
@ -26,10 +26,11 @@
"lint-staged": "^9.5.0", "lint-staged": "^9.5.0",
"postcss-px-to-viewport": "git+https://git.inscloudtech.com/mirrors/postcss-px-to-viewport.git", "postcss-px-to-viewport": "git+https://git.inscloudtech.com/mirrors/postcss-px-to-viewport.git",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"rollup-plugin-uglify": "^6.0.4",
"sass": "^1.26.5", "sass": "^1.26.5",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11",
"vue-async-computed": "^3.9.0"
"vue-async-computed": "^3.9.0",
"vue-template-compiler": "^2.6.11"
}, },
"gitHooks": { "gitHooks": {
"pre-commit": "lint-staged" "pre-commit": "lint-staged"

29
src/tis_app_template_kt/rollup.config.js

@ -0,0 +1,29 @@
import { uglify } from 'rollup-plugin-uglify'
export default {
input: 'src/tis/bus.js',
output: {
file: 'bus.min.js',
format: 'iife'
},
external: [
'vue',
'axios'
],
plugins: [
uglify()
/*
babel({
exclude: ["node_modules/**"],
presets: [
[
"@babel/env", {
modules: false,
targets: "last 2 versions, ie >= 10"
}
]
]
})
*/
]
}

28
src/tis_app_template_kt/yarn.lock

@ -5266,6 +5266,14 @@ javascript-stringify@^2.0.1:
resolved "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-2.1.0.tgz?cache=0&sync_timestamp=1618360134745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjavascript-stringify%2Fdownload%2Fjavascript-stringify-2.1.0.tgz#27c76539be14d8bd128219a2d731b09337904e79" resolved "https://registry.npm.taobao.org/javascript-stringify/download/javascript-stringify-2.1.0.tgz?cache=0&sync_timestamp=1618360134745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjavascript-stringify%2Fdownload%2Fjavascript-stringify-2.1.0.tgz#27c76539be14d8bd128219a2d731b09337904e79"
integrity sha1-J8dlOb4U2L0Sghmi1zGwkzeQTnk= integrity sha1-J8dlOb4U2L0Sghmi1zGwkzeQTnk=
jest-worker@^24.0.0:
version "24.9.0"
resolved "https://registry.npmmirror.com/jest-worker/download/jest-worker-24.9.0.tgz?cache=0&sync_timestamp=1634626737887&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fjest-worker%2Fdownload%2Fjest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5"
integrity sha1-Xb/bWy0yLphWeJgjipaXvM5ns+U=
dependencies:
merge-stream "^2.0.0"
supports-color "^6.1.0"
js-message@1.0.7: js-message@1.0.7:
version "1.0.7" version "1.0.7"
resolved "https://registry.npm.taobao.org/js-message/download/js-message-1.0.7.tgz#fbddd053c7a47021871bb8b2c95397cc17c20e47" resolved "https://registry.npm.taobao.org/js-message/download/js-message-1.0.7.tgz#fbddd053c7a47021871bb8b2c95397cc17c20e47"
@ -7450,6 +7458,16 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0" hash-base "^3.0.0"
inherits "^2.0.1" inherits "^2.0.1"
rollup-plugin-uglify@^6.0.4:
version "6.0.4"
resolved "https://registry.npm.taobao.org/rollup-plugin-uglify/download/rollup-plugin-uglify-6.0.4.tgz#65a0959d91586627f1e46a7db966fd504ec6c4e6"
integrity sha1-ZaCVnZFYZifx5Gp9uWb9UE7GxOY=
dependencies:
"@babel/code-frame" "^7.0.0"
jest-worker "^24.0.0"
serialize-javascript "^2.1.2"
uglify-js "^3.4.9"
run-async@^2.4.0: run-async@^2.4.0:
version "2.4.1" version "2.4.1"
resolved "https://registry.npm.taobao.org/run-async/download/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" resolved "https://registry.npm.taobao.org/run-async/download/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
@ -7590,6 +7608,11 @@ send@0.17.1:
range-parser "~1.2.1" range-parser "~1.2.1"
statuses "~1.5.0" statuses "~1.5.0"
serialize-javascript@^2.1.2:
version "2.1.2"
resolved "https://registry.nlark.com/serialize-javascript/download/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
integrity sha1-7OxTsOAxe9yV73arcHS3OEeF+mE=
serialize-javascript@^4.0.0: serialize-javascript@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.nlark.com/serialize-javascript/download/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" resolved "https://registry.nlark.com/serialize-javascript/download/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa"
@ -8426,6 +8449,11 @@ uglify-js@3.4.x:
commander "~2.19.0" commander "~2.19.0"
source-map "~0.6.1" source-map "~0.6.1"
uglify-js@^3.4.9:
version "3.14.2"
resolved "https://registry.nlark.com/uglify-js/download/uglify-js-3.14.2.tgz?cache=0&sync_timestamp=1631026519465&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fuglify-js%2Fdownload%2Fuglify-js-3.14.2.tgz#d7dd6a46ca57214f54a2d0a43cad0f35db82ac99"
integrity sha1-191qRspXIU9UotCkPK0PNduCrJk=
unbox-primitive@^1.0.1: unbox-primitive@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.npm.taobao.org/unbox-primitive/download/unbox-primitive-1.0.1.tgz?cache=0&sync_timestamp=1616706302651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funbox-primitive%2Fdownload%2Funbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" resolved "https://registry.npm.taobao.org/unbox-primitive/download/unbox-primitive-1.0.1.tgz?cache=0&sync_timestamp=1616706302651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funbox-primitive%2Fdownload%2Funbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471"

Loading…
Cancel
Save