Skip to content

Commit

Permalink
feat: 新增各 package 入口文件
Browse files Browse the repository at this point in the history
  • Loading branch information
taixw2 committed Apr 17, 2020
1 parent dac4765 commit fa5ad2a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
5 changes: 5 additions & 0 deletions packages/common/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const DxCommon = require('./src/index.ts');

module.exports = DxCommon;
module.exports.default = DxCommon.default;
7 changes: 7 additions & 0 deletions packages/common/npm/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/common.production.min.js');
} else {
module.exports = require('./cjs/common.development.js');
}
3 changes: 2 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"author": "mro <[email protected]>",
"homepage": "https://github.com/taixw2/dx#readme",
"license": "MIT",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/taixw2/dx.git"
Expand All @@ -19,11 +20,11 @@
"url": "https://github.com/taixw2/dx/issues"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@types/react-redux": "^7.1.7",
"@types/redux-saga": "^0.10.5"
},
"dependencies": {
"@dxjs/shared": "^0.0.0",
"es6-symbol": "^3.1.3",
"invariant": "^2.2.4",
"react-redux": "^7.2.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/core/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const Dx = require('./src/index.ts');

module.exports = Dx;
module.exports.default = Dx.default;
7 changes: 7 additions & 0 deletions packages/core/npm/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/core.production.min.js');
} else {
module.exports = require('./cjs/core.development.js');
}
5 changes: 2 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"author": "mro <[email protected]>",
"homepage": "https://github.com/taixw2/dx#readme",
"license": "MIT",
"main": "src/core.ts",
"main": "index.js",
"directories": {
"lib": "lib",
"test": "__tests__"
Expand All @@ -33,6 +33,7 @@
"url": "https://github.com/taixw2/dx/issues"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@chores/tsconfig": "^1.0.1",
"@types/invariant": "^2.2.31",
"@types/react": "^16.9.29",
Expand All @@ -41,8 +42,6 @@
"react": "^16.13.1"
},
"dependencies": {
"@dxjs/common": "^0.0.0",
"@dxjs/shared": "^0.0.0",
"es6-symbol": "^3.1.3",
"immer": "^6.0.3",
"iterare": "^1.2.0",
Expand Down

0 comments on commit fa5ad2a

Please sign in to comment.