From b4ce80d812dde0d2fbdc5696e0f0c7433eacce6a Mon Sep 17 00:00:00 2001 From: huyueb <1062887235@qq.com> Date: Thu, 4 Jan 2018 16:58:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=91=E9=80=9A=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .babelrc | 3 + package.json | 157 ++++++++++++++++++++++++--------------------- test/index.test.js | 11 ++-- 3 files changed, 94 insertions(+), 77 deletions(-) create mode 100644 .babelrc diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..86c445f --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["es2015", "react"] +} diff --git a/package.json b/package.json index a1d55a9..f8ca8fa 100644 --- a/package.json +++ b/package.json @@ -1,75 +1,86 @@ { - "name": "bee-table", - "version": "1.0.10", - "description": "Table ui component for react", - "keywords": [ - "react", - "react-component", - "bee-table", - "iuap-design", - "tinper-bee", - "Table" - ], - "engines": { - "node": ">=4.0.0" - }, - "homepage": "https://github.com/tinper-bee/bee-table.git", - "author": "Yonyou FED", - "repository": "http://github.com/tinper-bee/bee-table", - "bugs": "https://github.com/tinper-bee/bee-table.git/issues", - "license": "MIT", - "main": "./build/index.js", - "config": { - "port": 3000, - "commitizen": { - "path": "./node_modules/cz-conventional-changelog" + "name": "bee-table", + "version": "1.0.10", + "description": "Table ui component for react", + "keywords": [ + "react", + "react-component", + "bee-table", + "iuap-design", + "tinper-bee", + "Table" + ], + "engines": { + "node": ">=4.0.0" + }, + "jest": { + "moduleFileExtensions": [ + "js", + "jsx" + ], + "transform": { + "^.+\\.js$": "babel-jest" + } + }, + "homepage": "https://github.com/tinper-bee/bee-table.git", + "author": "Yonyou FED", + "repository": "http://github.com/tinper-bee/bee-table", + "bugs": "https://github.com/tinper-bee/bee-table.git/issues", + "license": "MIT", + "main": "./build/index.js", + "config": { + "port": 3000, + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + }, + "scripts": { + "dev": "bee-tools run start", + "build": "bee-tools run build", + "lint": "bee-tools run lint", + "test": "jest", + "chrome": "bee-tools run chrome", + "coveralls": "", + "browsers": "bee-tools run browsers", + "pub": "bee-tools run pub", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0" + }, + "dependencies": { + "classnames": "^2.2.5", + "object-path": "^0.11.3", + "tinper-bee-core": "latest", + "warning": "^3.0.0" + }, + "peerDependencies": { + "react": "^15.3.0 || ^16.0", + "react-dom": "^15.3.0 || ^16.0", + "prop-types": "15.6.0" + }, + "devDependencies": { + "babel-jest": "^22.0.4", + "bee-animate": "latest", + "bee-button": "latest", + "bee-checkbox": "latest", + "bee-datepicker": "latest", + "bee-form": "^1.0.8", + "bee-form-control": "latest", + "bee-icon": "latest", + "bee-input-group": "latest", + "bee-layout": "latest", + "bee-pagination": "latest", + "bee-panel": "latest", + "bee-popconfirm": "^1.0.1", + "bee-select": "latest", + "bee-tools": "latest", + "bee-tooltip": "^1.0.2", + "chai": "^3.5.0", + "console-polyfill": "~0.2.1", + "cz-conventional-changelog": "^2.1.0", + "enzyme": "^2.9.1", + "es5-shim": "~4.1.10", + "jest": "^22.0.4", + "react": "^15.5.0", + "react-addons-test-utils": "^15.5.0", + "react-dom": "^15.5.0" } - }, - "scripts": { - "dev": "bee-tools run start", - "build": "bee-tools run build", - "lint": "bee-tools run lint", - "test": "bee-tools run test", - "chrome": "bee-tools run chrome", - "coveralls": "bee-tools run coverage", - "browsers": "bee-tools run browsers", - "pub": "bee-tools run pub", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0" - }, - "dependencies": { - "classnames": "^2.2.5", - "object-path": "^0.11.3", - "tinper-bee-core": "latest", - "warning": "^3.0.0" - }, - "peerDependencies": { - "react": "^15.3.0 || ^16.0", - "react-dom": "^15.3.0 || ^16.0", - "prop-types": "15.6.0" - }, - "devDependencies": { - "bee-animate": "latest", - "bee-button": "latest", - "bee-checkbox": "latest", - "bee-datepicker": "latest", - "bee-form": "^1.0.8", - "bee-form-control": "latest", - "bee-icon": "latest", - "bee-input-group": "latest", - "bee-layout": "latest", - "bee-pagination": "latest", - "bee-panel": "latest", - "bee-popconfirm": "^1.0.1", - "bee-select": "latest", - "bee-tools": "latest", - "bee-tooltip": "^1.0.2", - "chai": "^3.5.0", - "console-polyfill": "~0.2.1", - "cz-conventional-changelog": "^2.1.0", - "enzyme": "^2.4.1", - "es5-shim": "~4.1.10", - "react": "^15.5.0", - "react-addons-test-utils": "^15.5.0", - "react-dom": "^15.5.0" - } -} \ No newline at end of file +} diff --git a/test/index.test.js b/test/index.test.js index fdd17b3..b48e5ea 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,4 +1,7 @@ -import React from 'react'; -import {shallow, mount, render} from 'enzyme'; -import {expect} from 'chai'; -import Table from '../src/index'; \ No newline at end of file +import React from "react"; +import { shallow } from "enzyme"; +import Table from "../build/index"; + +it("bee-table test", () => { + expect(3).toBe(3); +});