Skip to content

Commit

Permalink
Merge pull request #70 from react-component/add-es
Browse files Browse the repository at this point in the history
feat: add es
  • Loading branch information
shepherdwind committed May 16, 2017
2 parents 4c1d5d9 + a260f7d commit 52259d9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -25,3 +25,4 @@ assets/**/*.css
build
lib
coverage
es
25 changes: 18 additions & 7 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "rc-collapse",
"version": "1.7.3",
"version": "1.7.4",
"description": "rc-collapse ui component for react",
"keywords": [
"react",
Expand All @@ -22,36 +22,47 @@
"license": "MIT",
"files": [
"lib",
"es",
"assets/*.css"
],
"main": "./lib/index",
"module": "./es/index",
"config": {
"port": 8002
},
"scripts": {
"build": "rc-tools run build",
"gh-pages": "rc-tools run gh-pages",
"start": "rc-tools run server",
"compile": "rc-tools run compile --babel-runtime",
"pub": "npm version patch && rc-tools run pub",
"lint": "rc-tools run lint",
"karma": "rc-tools run karma",
"saucelabs": "rc-tools run saucelabs",
"test": "rc-tools run test",
"chrome-test": "rc-tools run chrome-test",
"coverage": "rc-tools run coverage"
"test": "jest",
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls"
},
"devDependencies": {
"coveralls": "^2.13.1",
"expect.js": "0.3.x",
"jest": "^20.0.1",
"jquery": "1.x",
"pre-commit": "1.x",
"rc-tools": "5.x",
"rc-tools": "6.x",
"react": "15.x",
"react-dom": "15.x",
"string.prototype.repeat": "^0.2.0"
},
"pre-commit": [
"lint"
],
"jest": {
"collectCoverageFrom": [
"src/*"
],
"transform": {
"\\.tsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js",
"\\.jsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js"
}
},
"dependencies": {
"classnames": "2.x",
"css-animation": "1.x",
Expand Down
1 change: 1 addition & 0 deletions src/index.js
@@ -1,3 +1,4 @@
import Collapse from './Collapse';

export default Collapse;
export const Panel = Collapse.Panel;
17 changes: 8 additions & 9 deletions tests/index.js → tests/index.spec.js
@@ -1,12 +1,11 @@
const jQuery = require('jquery');
window.jQuery = jQuery;
import '../assets/index.less';
const expect = require('expect.js');
const Collapse = require('../index');
const Panel = Collapse.Panel;
const React = require('react');
const ReactDOM = require('react-dom');
const TestUtils = require('react-dom/test-utils');
// import '../assets/index.less';

import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-dom/test-utils';

import expect from 'expect.js';
import Collapse, { Panel } from '../index';
const Simulate = TestUtils.Simulate;
const findDOMNode = TestUtils.scryRenderedDOMComponentsWithClass;

Expand Down

0 comments on commit 52259d9

Please sign in to comment.