Skip to content

Commit

Permalink
fix: publish with father-next (umijs#555)
Browse files Browse the repository at this point in the history
* fix: publish

* v1.13.3-beta.1

* chore: update yarn.lock

* chore: add github ci

* fix: ci

* fix: ci

* chore: remove travis ci
  • Loading branch information
sorrycc authored Nov 24, 2020
1 parent 20f59cf commit c5d7cdb
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 9,585 deletions.
5 changes: 5 additions & 0 deletions .fatherrc-next.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

export default {
platform: 'node',
formats: ['cjs'],
}
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Node CI

on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [10.x, 12.x, 14.x]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '1'
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: restore lerna
id: cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: install
if: steps.cache.outputs.cache-hit != 'true'
run: npm install
- run: npm run build
- run: npm test --forceExit
env:
CI: true
HEADLESS: false
PROGRESS: none
NODE_ENV: test

16 changes: 9 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.idea
tmp
node_modules
coverage
lib
*.log
*.log.*
/.idea
/tmp
/node_modules
/coverage
/lib
/*.log
/*.log.*
/yarn.lock

6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "babel-plugin-import",
"version": "1.13.2",
"version": "1.13.3-beta.1",
"description": "Component modular import plugin for babel.",
"repository": {
"type": "git",
"url": "https://github.com/ant-design/babel-plugin-import"
},
"main": "lib/index.js",
"scripts": {
"build": "umi-tools build",
"test": "umi-tools test --coverage",
"debug": "umi-tools test",
"build": "father-next",
"test": "umi-test --coverage",
"debug": "umi-test",
"lint": "eslint --ext .js src",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"prepack": "npm run build",
"prepublishOnly": "npm run build && np --no-cleanup --yolo --no-publish"
"prepublishOnly": "npm run build && np --no-cleanup --yolo --no-publish --any-branch"
},
"husky": {
"hooks": {
Expand All @@ -36,6 +36,7 @@
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@umijs/test": "^3.2.28",
"babel-core": "^7.0.0-0",
"babel-preset-umi": "^1.0.0",
"coveralls": "^3.0.6",
Expand All @@ -44,13 +45,13 @@
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-prettier": "^3.1.3",
"father-next": "^3.0.0-alpha.3",
"husky": "^4.2.5",
"lint-staged": "^10.2.8",
"material-ui": "^0.20.2",
"np": "^6.2.0",
"prettier": "^2.0.5",
"react-toolbox": "^1.2.5",
"umi-tools": "^0.4.0"
"react-toolbox": "^1.2.5"
},
"babel": {
"presets": [
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/custom-name-source-file/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var _button = _interopRequireDefault(require("antd/lib/button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", {
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", {
component: _button.default
}));
}));
4 changes: 2 additions & 2 deletions test/fixtures/custom-name/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var _button = _interopRequireDefault(require("antd/lib/button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", {
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", {
component: _button.default
}));
}));
2 changes: 1 addition & 1 deletion test/fixtures/custom-style-name/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ var _button2 = _interopRequireDefault(require("element-ui/lib/button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button2.default, null, "xxxx")));
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button2.default, null, "xxxx")));
2 changes: 1 addition & 1 deletion test/fixtures/custom-style-path-ignore/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ var _reactDom = _interopRequireDefault(require("react-dom"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement(_animation.default, null, _react.default.createElement(_button.default, null, "xxxx")), document.getElementById("react-container"));
ReactDOM.render( /*#__PURE__*/_react.default.createElement(_animation.default, null, /*#__PURE__*/_react.default.createElement(_button.default, null, "xxxx")), document.getElementById("react-container"));
2 changes: 1 addition & 1 deletion test/fixtures/custom-style-path/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ var _reactDom = _interopRequireDefault(require("react-dom"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button.default, null, "xxxx")), document.getElementById('react-container'));
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, null, "xxxx")), document.getElementById('react-container'));
2 changes: 1 addition & 1 deletion test/fixtures/import-css/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ var _message2 = _interopRequireDefault(require("antd/lib/message"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

(0, _message2.default)('xxx');
ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button.default, null, "xxxx")));
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, null, "xxxx")));
4 changes: 2 additions & 2 deletions test/fixtures/member-expression/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var _button = _interopRequireDefault(require("antd/lib/button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button.default, {
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, {
type: "primary"
}, "Button")));
}, "Button")));
2 changes: 1 addition & 1 deletion test/fixtures/modules-false/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ var _reactDom = _interopRequireDefault(require("react-dom"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button.default, null, "xxxx")), document.getElementById('react-container'));
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, null, "xxxx")), document.getElementById('react-container'));
3 changes: 2 additions & 1 deletion test/fixtures/multiple-words/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ var _inputNumber = _interopRequireDefault(require("antd/lib/input-number"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

_react.default.createElement(_inputNumber.default, null);
/*#__PURE__*/
_react.default.createElement(_inputNumber.default, null);
4 changes: 2 additions & 2 deletions test/fixtures/property/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ var _button = _interopRequireDefault(require("antd/lib/button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", {
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", {
component: _button.default
}));
}));
2 changes: 1 addition & 1 deletion test/fixtures/react-element/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ var _button = _interopRequireDefault(require("antd/lib/button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button.default, null, "xxxx")));
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, null, "xxxx")));
2 changes: 1 addition & 1 deletion test/fixtures/specifier-alias/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ var _button = _interopRequireDefault(require("antd/lib/button"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var foo = _button.default.foo;
ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button.default, null, "xxxx")));
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, null, "xxxx")));
2 changes: 1 addition & 1 deletion test/fixtures/style-library-name/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ var _button2 = _interopRequireDefault(require("element-ui/lib/button"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

ReactDOM.render(_react.default.createElement("div", null, _react.default.createElement(_button2.default, null, "xxxx")));
ReactDOM.render( /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button2.default, null, "xxxx")));
4 changes: 2 additions & 2 deletions test/fixtures/variable-scope/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ var testFunction3 = function testFunction3(message) {

function App() {
var message = 'xxx';
return _react.default.createElement("div", null, message);
}
return /*#__PURE__*/_react.default.createElement("div", null, message);
}
Loading

0 comments on commit c5d7cdb

Please sign in to comment.