mirror of
https://github.com/SunnyQjm/taro-cropper.git
synced 2026-06-06 07:59:31 +08:00
update: 升级taro版本至2.0.4
This commit is contained in:
+2
-2
@@ -4,6 +4,6 @@ module.exports = {
|
||||
},
|
||||
defineConstants: {
|
||||
},
|
||||
weapp: {},
|
||||
mini: {},
|
||||
h5: {}
|
||||
}
|
||||
};
|
||||
|
||||
+37
-74
@@ -9,60 +9,31 @@ const config = {
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
outputRoot: 'dist',
|
||||
plugins: {
|
||||
babel: {
|
||||
sourceMap: true,
|
||||
presets: [
|
||||
['env', {
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
plugins: [
|
||||
'transform-decorators-legacy',
|
||||
'transform-class-properties',
|
||||
'transform-object-rest-spread'
|
||||
]
|
||||
}
|
||||
},
|
||||
defineConstants: {
|
||||
},
|
||||
copy: {
|
||||
patterns: [
|
||||
babel: {
|
||||
sourceMap: true,
|
||||
presets: [
|
||||
['env', {
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
options: {
|
||||
}
|
||||
plugins: [
|
||||
'transform-decorators-legacy',
|
||||
'transform-class-properties',
|
||||
'transform-object-rest-spread'
|
||||
]
|
||||
},
|
||||
weapp: {
|
||||
module: {
|
||||
postcss: {
|
||||
autoprefixer: {
|
||||
enable: true,
|
||||
config: {
|
||||
browsers: [
|
||||
'last 3 versions',
|
||||
'Android >= 4.1',
|
||||
'ios >= 8'
|
||||
]
|
||||
}
|
||||
},
|
||||
pxtransform: {
|
||||
enable: true,
|
||||
config: {
|
||||
|
||||
}
|
||||
},
|
||||
url: {
|
||||
enable: true,
|
||||
config: {
|
||||
limit: 10240 // 设定转换尺寸上限
|
||||
}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
mini: {
|
||||
webpackChain (chain, webpack) {},
|
||||
cssLoaderOption: {},
|
||||
postcss: {
|
||||
pxtransform: {
|
||||
enable: true,
|
||||
config: {}
|
||||
},
|
||||
url: {
|
||||
enable: true,
|
||||
config: {
|
||||
limit: 10240 // 设定转换尺寸上限
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,24 +41,16 @@ const config = {
|
||||
h5: {
|
||||
publicPath: '/',
|
||||
staticDirectory: 'static',
|
||||
module: {
|
||||
postcss: {
|
||||
autoprefixer: {
|
||||
enable: true,
|
||||
config: {
|
||||
browsers: [
|
||||
'last 3 versions',
|
||||
'Android >= 4.1',
|
||||
'ios >= 8'
|
||||
]
|
||||
}
|
||||
},
|
||||
cssModules: {
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||
}
|
||||
webpackChain (chain, webpack) {},
|
||||
postcss: {
|
||||
autoprefixer: {
|
||||
enable: true,
|
||||
config: {
|
||||
browsers: [
|
||||
'last 3 versions',
|
||||
'Android >= 4.1',
|
||||
'ios >= 8'
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,10 +62,10 @@ if (process.env.TARO_BUILD_TYPE === 'ui') {
|
||||
enableSourceMap: false,
|
||||
enableExtract: false,
|
||||
enableDll: false
|
||||
})
|
||||
});
|
||||
config.h5.webpackChain = chain => {
|
||||
chain.plugins.delete('htmlWebpackPlugin')
|
||||
chain.plugins.delete('addAssetHtmlWebpackPlugin')
|
||||
chain.plugins.delete('htmlWebpackPlugin');
|
||||
chain.plugins.delete('addAssetHtmlWebpackPlugin');
|
||||
chain.merge({
|
||||
output: {
|
||||
path: path.join(process.cwd(), 'dist', 'h5'),
|
||||
@@ -126,4 +89,4 @@ module.exports = function (merge) {
|
||||
return merge({}, config, require('./dev'))
|
||||
}
|
||||
return merge({}, config, require('./prod'))
|
||||
}
|
||||
};
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ module.exports = {
|
||||
},
|
||||
defineConstants: {
|
||||
},
|
||||
weapp: {},
|
||||
mini: {},
|
||||
h5: {
|
||||
/**
|
||||
* 如果h5端编译后体积过大,可以使用webpack-bundle-analyzer插件对打包体积进行分析。
|
||||
@@ -15,4 +15,4 @@ module.exports = {
|
||||
* }
|
||||
*/
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+82
-81
@@ -1,83 +1,84 @@
|
||||
{
|
||||
"name": "taro-cropper",
|
||||
"version": "1.1.0",
|
||||
"private": false,
|
||||
"description": "Taro框架下的图片裁剪组件封装,开箱即用",
|
||||
"main": "dist/index.js",
|
||||
"main:h5": "dist/index.js",
|
||||
"templateInfo": {
|
||||
"name": "default",
|
||||
"typescript": true,
|
||||
"css": "sass"
|
||||
},
|
||||
"types": "./@types/index.d.ts",
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
"build:swan": "taro build --type swan",
|
||||
"build:alipay": "taro build --type alipay",
|
||||
"build:tt": "taro build --type tt",
|
||||
"build:h5": "taro build --type h5",
|
||||
"build:rn": "taro build --type rn",
|
||||
"build:qq": "taro build --type qq",
|
||||
"build:quickapp": "taro build --type quickapp",
|
||||
"dev:weapp": "npm run build:weapp -- --watch",
|
||||
"dev:swan": "npm run build:swan -- --watch",
|
||||
"dev:alipay": "npm run build:alipay -- --watch",
|
||||
"dev:tt": "npm run build:tt -- --watch",
|
||||
"dev:h5": "npm run build:h5 -- --watch",
|
||||
"dev:rn": "npm run build:rn -- --watch",
|
||||
"dev:qq": "npm run build:qq -- --watch",
|
||||
"dev:quickapp": "npm run build:quickapp -- --watch",
|
||||
"build:ui": "TARO_BUILD_TYPE=ui taro build --ui"
|
||||
},
|
||||
"author": "SunnyQjm",
|
||||
"license": "MIT",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@tarojs/components-qa": "^1.3.25",
|
||||
"@tarojs/cli": "1.3.25",
|
||||
"@tarojs/components": "1.3.25",
|
||||
"@tarojs/plugin-babel": "1.3.25",
|
||||
"@tarojs/plugin-csso": "1.3.25",
|
||||
"@tarojs/plugin-sass": "1.3.25",
|
||||
"@tarojs/plugin-uglifyjs": "1.3.25",
|
||||
"@tarojs/router": "1.3.25",
|
||||
"@tarojs/taro": "1.3.25",
|
||||
"@tarojs/taro-alipay": "1.3.25",
|
||||
"@tarojs/taro-h5": "1.3.25",
|
||||
"@tarojs/taro-qq": "1.3.25",
|
||||
"@tarojs/taro-quickapp": "1.3.25",
|
||||
"@tarojs/taro-swan": "1.3.25",
|
||||
"@tarojs/taro-tt": "1.3.25",
|
||||
"@tarojs/taro-weapp": "1.3.25",
|
||||
"@tarojs/webpack-runner": "1.3.25",
|
||||
"@types/react": "^16.4.6",
|
||||
"@types/webpack-env": "^1.13.6",
|
||||
"@typescript-eslint/parser": "^1.6.0",
|
||||
"babel-eslint": "^8.2.3",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
"babel-plugin-transform-jsx-stylesheet": "^0.6.5",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-taro": "1.3.25",
|
||||
"eslint-plugin-import": "^2.12.0",
|
||||
"eslint-plugin-react": "^7.8.2",
|
||||
"eslint-plugin-react-hooks": "^1.6.1",
|
||||
"eslint-plugin-taro": "1.3.25",
|
||||
"hap-toolkit": "^0.6.6",
|
||||
"nerv-devtools": "^1.5.5",
|
||||
"nervjs": "^1.5.5",
|
||||
"stylelint": "9.3.0",
|
||||
"stylelint-config-taro-rn": "1.3.25",
|
||||
"stylelint-taro-rn": "1.3.25",
|
||||
"typescript": "^3.0.1"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src",
|
||||
"@types",
|
||||
"README.md"
|
||||
]
|
||||
"name": "taro-cropper",
|
||||
"version": "1.1.0",
|
||||
"private": false,
|
||||
"description": "Taro框架下的图片裁剪组件封装,开箱即用",
|
||||
"main": "dist/index.js",
|
||||
"main:h5": "dist/index.js",
|
||||
"templateInfo": {
|
||||
"name": "default",
|
||||
"typescript": true,
|
||||
"css": "sass"
|
||||
},
|
||||
"types": "./@types/index.d.ts",
|
||||
"scripts": {
|
||||
"build:weapp": "taro build --type weapp",
|
||||
"build:swan": "taro build --type swan",
|
||||
"build:alipay": "taro build --type alipay",
|
||||
"build:tt": "taro build --type tt",
|
||||
"build:h5": "taro build --type h5",
|
||||
"build:rn": "taro build --type rn",
|
||||
"build:qq": "taro build --type qq",
|
||||
"build:quickapp": "taro build --type quickapp",
|
||||
"dev:weapp": "npm run build:weapp -- --watch",
|
||||
"dev:swan": "npm run build:swan -- --watch",
|
||||
"dev:alipay": "npm run build:alipay -- --watch",
|
||||
"dev:tt": "npm run build:tt -- --watch",
|
||||
"dev:h5": "npm run build:h5 -- --watch",
|
||||
"dev:rn": "npm run build:rn -- --watch",
|
||||
"dev:qq": "npm run build:qq -- --watch",
|
||||
"dev:quickapp": "npm run build:quickapp -- --watch",
|
||||
"build:ui": "TARO_BUILD_TYPE=ui taro build --ui"
|
||||
},
|
||||
"author": "SunnyQjm",
|
||||
"license": "MIT",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@tarojs/cli": "2.0.4",
|
||||
"@tarojs/components": "2.0.4",
|
||||
"@tarojs/components-qa": "2.0.4",
|
||||
"@tarojs/mini-runner": "^2.0.4",
|
||||
"@tarojs/plugin-babel": "2.0.4",
|
||||
"@tarojs/plugin-csso": "2.0.4",
|
||||
"@tarojs/plugin-sass": "2.0.4",
|
||||
"@tarojs/plugin-uglifyjs": "2.0.4",
|
||||
"@tarojs/router": "2.0.4",
|
||||
"@tarojs/taro": "2.0.4",
|
||||
"@tarojs/taro-alipay": "2.0.4",
|
||||
"@tarojs/taro-h5": "2.0.4",
|
||||
"@tarojs/taro-qq": "2.0.4",
|
||||
"@tarojs/taro-quickapp": "2.0.4",
|
||||
"@tarojs/taro-swan": "2.0.4",
|
||||
"@tarojs/taro-tt": "2.0.4",
|
||||
"@tarojs/taro-weapp": "2.0.4",
|
||||
"@tarojs/webpack-runner": "2.0.4",
|
||||
"@types/react": "^16.4.6",
|
||||
"@types/webpack-env": "^1.13.6",
|
||||
"@typescript-eslint/parser": "^1.6.0",
|
||||
"babel-eslint": "^8.2.3",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
"babel-plugin-transform-jsx-stylesheet": "^0.6.5",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-taro": "2.0.4",
|
||||
"eslint-plugin-import": "^2.12.0",
|
||||
"eslint-plugin-react": "^7.8.2",
|
||||
"eslint-plugin-react-hooks": "^1.6.1",
|
||||
"eslint-plugin-taro": "2.0.4",
|
||||
"hap-toolkit": "^0.6.6",
|
||||
"nerv-devtools": "^1.5.6",
|
||||
"nervjs": "^1.5.6",
|
||||
"stylelint": "9.3.0",
|
||||
"stylelint-config-taro-rn": "2.0.4",
|
||||
"stylelint-taro-rn": "2.0.4",
|
||||
"typescript": "^3.0.1"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"src",
|
||||
"@types",
|
||||
"README.md"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user