Skip to content

Commit

Permalink
feat(graphin):update pack tool
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Jan 21, 2021
1 parent f8275fa commit bd998a7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 17 deletions.
10 changes: 6 additions & 4 deletions packages/graphin-components/package.json
@@ -1,15 +1,16 @@
{
"name": "@antv/graphin-components",
"version": "2.0.0-beta.4",
"version": "2.0.0-beta.5",
"description": "Components for graphin",
"main": "lib/index.js",
"module": "es/index.js",
"types": "lib/index.d.ts",
"scripts": {
"start": "father build --watch",
"build": "father build & npm run build:umd",
"start": "npm run clean && father build --watch",
"build": "npm run clean && father build & npm run build:umd",
"build:umd": "node --max_old_space_size=8192 ./node_modules/webpack/bin/webpack.js --env.NODE_ENV=production -c ./webpack.config.js ",
"test": "jest"
"test": "jest",
"clean": "rimraf es esm lib dist"
},
"author": "",
"license": "MIT",
Expand Down Expand Up @@ -43,6 +44,7 @@
"mini-css-extract-plugin": "^0.8.0",
"react-color": "^2.19.3",
"react-pie-menu": "^0.2.5",
"rimraf": "^3.0.2",
"source-map-loader": "^0.2.4",
"style-loader": "^1.0.0",
"styled-components": "^5.2.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/graphin-components/webpack.config.js
Expand Up @@ -3,10 +3,10 @@ const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

module.exports = env => {
module.exports = (env) => {
return {
entry: {
bundle: './src/index.ts',
index: './src/index.ts',
},
mode: env.NODE_ENV,
module: {
Expand Down
1 change: 1 addition & 0 deletions packages/graphin-graphscope/package.json
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.9",
"description": "An Example for GraphScope",
"main": "lib/index.js",
"module": "es/index.js",
"types": "lib/index.d.ts",
"scripts": {
"start": "father build --watch",
Expand Down
10 changes: 7 additions & 3 deletions packages/graphin/.fatherrc.js
@@ -1,5 +1,9 @@
export default {
esm: { type: 'rollup', file: 'index', importLibToEs: true },
lessInRollupMode: {},
extractCSS: true,
// esm: { type: 'rollup', file: 'index', importLibToEs: true },
// lessInRollupMode: {},
// extractCSS: true,
entry: './src/index.ts',
esm: 'babel',
cjs: 'babel',
lessInBabelMode: true,
};
14 changes: 8 additions & 6 deletions packages/graphin/package.json
@@ -1,15 +1,17 @@
{
"name": "@antv/graphin",
"version": "2.0.0",
"version": "2.0.0-beta.5",
"description": "the react toolkit for graph analysis based on g6",
"main": "./dist/index",
"types": "./dist/index.d",
"main": "lib/index.js",
"module": "es/index.js",
"types": "lib/index.d.ts",
"scripts": {
"start": "father build --watch",
"build": "father build && npm run build:umd",
"start": "npm run clean && father build --watch",
"build": "npm run clean && father build && npm run build:umd",
"build:umd": "node --max_old_space_size=8192 ./node_modules/webpack/bin/webpack.js --env.NODE_ENV=production -c ./webpack.config.js ",
"test": "jest",
"prettier": "prettier --write ./src/**/**/**/*.js"
"prettier": "prettier --write ./src/**/**/**/*.js",
"clean": "rimraf es esm lib dist"
},
"devDependencies": {
"@ant-design/icons": "^4.3.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/graphin/tsconfig.json
Expand Up @@ -11,7 +11,9 @@
"strict": true,
"lib": ["dom", "esnext"],
"esModuleInterop": true,
"typeRoots": ["./node_modules/@types/", "./typings/index.d.ts"]
"typeRoots": ["./node_modules/@types/", "./typings/index.d.ts"],
"skipLibCheck": true,
"isolatedModules": false
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion packages/graphin/webpack.config.js
Expand Up @@ -6,7 +6,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = env => {
return {
entry: {
bundle: './src/index.ts',
index: './src/index.ts',
},
mode: env.NODE_ENV,
module: {
Expand Down

0 comments on commit bd998a7

Please sign in to comment.