diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index 7558d46..0000000 --- a/jsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "baseUrl": ".", - "paths": { - "@/*": ["src/*"] - } - } -} diff --git a/package.json b/package.json index 892cb7c..424c78c 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "taro-code", - "version": "1.0.1", + "version": "1.1.0", "description": "Taro.js barcode & qrcode", "scripts": { - "build": "taro build --ui", + "build": "export TARO_BUILD_TYPE=ui && taro build --ui", "build:weapp": "taro build --type weapp", "build:swan": "taro build --type swan", "build:alipay": "taro build --type alipay", @@ -17,7 +17,7 @@ "dev:h5": "npm run build:h5 -- --watch", "dev:rn": "npm run build:rn -- --watch" }, - "files": ["dist"], + "files": ["dist", "src/components", ""], "author": "Miaonster ", "license": "MIT", "main": "dist/index.js", diff --git a/src/components/Barcode/index.js b/src/components/Barcode/index.js index ad7b0f9..4185a19 100644 --- a/src/components/Barcode/index.js +++ b/src/components/Barcode/index.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import Taro, { Component } from '@tarojs/taro' import { Canvas, View } from '@tarojs/components' -import utils from '@/utils' +import utils from '../../utils' import './style.css' class Barcode extends Component { diff --git a/src/components/Qrcode/index.js b/src/components/Qrcode/index.js index 73d611d..ddd9ac4 100644 --- a/src/components/Qrcode/index.js +++ b/src/components/Qrcode/index.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import Taro, { Component } from '@tarojs/taro' import { Canvas, View } from '@tarojs/components' -import utils from '@/utils' +import utils from '../../utils' import './style.css' class QRCode extends Component { diff --git a/src/index.js b/src/index.js index e67e0a8..274fac9 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,2 @@ -import Barcode from '@/components/Barcode'; -import QRCode from '@/components/QRCode'; - -export default { - Barcode, - QRCode, -} +export { default as Barcode } from './components/Barcode' +export { default as QRCode } from './components/QRCode' diff --git a/src/pages/index/index.js b/src/pages/index/index.js index bbc65c5..a3774e4 100644 --- a/src/pages/index/index.js +++ b/src/pages/index/index.js @@ -1,7 +1,7 @@ import Taro, { Component } from '@tarojs/taro' import { View } from '@tarojs/components' -import Barcode from '@/components/Barcode'; -import QRCode from '@/components/QRCode'; +import Barcode from '../../components/Barcode'; +import QRCode from '../../components/QRCode'; import './index.css' export default class Index extends Component {