diff --git a/.circleci/config.yml b/.circleci/config.yml index 07582d1..e5d2e79 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,12 +32,20 @@ jobs: root: . paths: - dist + publish: + <<: *defaults + steps: + - attach_workspace: + at: . + - run: yarn publish + test: <<: *defaults steps: - checkout - attach_workspace: at: . + - run: ls -la - run: yarn ci - store_test_results: path: test-results @@ -52,4 +60,7 @@ workflows: - test - test: requires: - - prepare \ No newline at end of file + - prepare + - publish: + requires: + - build diff --git a/lib/icon/importIcons.js b/lib/icon/importIcons.js index 8d3c025..b64f935 100644 --- a/lib/icon/importIcons.js +++ b/lib/icon/importIcons.js @@ -1,5 +1,5 @@ let importAll = (requireContext) => requireContext.keys().forEach(requireContext) try { - importAll(require.context('./icons/', true, /\.svg$/)) + importAll(require.context('../icons/', true, /\.svg$/)) } catch (error) { } diff --git a/lib/index.tsx b/lib/index.tsx index ab4c71d..f4a1590 100644 --- a/lib/index.tsx +++ b/lib/index.tsx @@ -1,16 +1,3 @@ -import ReactDOM from 'react-dom'; -import React from 'react'; -import Icon from './icon/icon'; +export {default as Icon} from './icon/icon'; -const fn: React.MouseEventHandler = (e) => { - console.log(e.target); -}; -ReactDOM.render(
- console.log('enter')} - onMouseLeave={() => console.log('leave')} - onTouchStart={() => console.log('touch')} - /> -
, document.querySelector('#root')); diff --git a/package.json b/package.json index abc3b16..1148ec1 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { - "name": "fui", - "version": "1.0.0", + "name": "fui888", + "version": "0.0.1", "description": "", "main": "dist/lib/index", "types": "dist/lib/index", + "files": ["/dist"], "scripts": { "test": "cross-env NODE_ENV=test jest --config=jest.config.js --runInBand", "start": "cross-env NODE_ENV=development webpack-dev-server --config webpack.config.dev.js",