Skip to content

Commit

Permalink
fix: remove esm which is a bit slow
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Oct 2, 2019
1 parent b734282 commit cc739dd
Show file tree
Hide file tree
Showing 14 changed files with 152 additions and 146 deletions.
10 changes: 9 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,13 @@
"extends": "@1stg/eslint-config/recommended",
"rules": {
"@typescript-eslint/unbound-method": 0
}
},
"overrides": [
{
"files": "*.ts",
"rules": {
"node/shebang": 0
}
}
]
}
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"scripts": {
"build": "lerna run build && run-p build:**",
"build:r": "ts-node -r esm --files packages/rollup/src/cli -e named -p",
"build:r": "ts-node --files packages/rollup/src/cli -e named -p",
"build:ts": "tsc -b",
"clean": "rm -rf packages/*/{lib,*.tsbuildinfo}",
"lint": "run-p lint:*",
Expand All @@ -22,12 +22,12 @@
"type-coverage": "type-coverage --cache --detail --ignore-files *.d.ts --strict"
},
"devDependencies": {
"@1stg/babel-preset": "^0.7.0",
"@1stg/babel-preset": "^0.7.2",
"@1stg/commitlint-config": "^0.1.0",
"@1stg/eslint-config": "^0.12.15",
"@1stg/eslint-config": "^0.12.18",
"@1stg/husky-config": "^0.3.0",
"@1stg/lint-staged": "^0.8.3",
"@1stg/prettier-config": "^0.3.3",
"@1stg/lint-staged": "^0.8.4",
"@1stg/prettier-config": "^0.4.1",
"@1stg/remark-config": "^0.2.2",
"@1stg/tsconfig": "^0.6.0",
"@1stg/tslint-config": "^0.4.2",
Expand All @@ -38,21 +38,21 @@
"@types/debug": "^4.1.5",
"@types/is-glob": "^4.0.1",
"@types/jest": "^24.0.18",
"@types/lodash-es": "^4.17.3",
"@types/node": "^12.7.8",
"@types/lodash": "^4.14.141",
"@types/node": "^12.7.9",
"@types/prettier": "^1.18.2",
"@types/rollup-plugin-json": "^3.0.2",
"@types/rollup-plugin-postcss": "^2.0.0",
"@types/rollup-plugin-url": "^2.2.0",
"debug": "^4.1.1",
"eslint": "^6.5.0",
"eslint": "^6.5.1",
"fbjs": "^1.0.0",
"husky": "^3.0.7",
"husky": "^3.0.8",
"is-glob": "^4.0.1",
"jest": "^24.9.0",
"lerna": "^3.16.4",
"lerna-changelog": "^0.8.2",
"lint-staged": "^9.4.0",
"lint-staged": "^9.4.1",
"npm-run-all": "^4.1.5",
"prettier": "^1.18.2",
"prop-types": "^15.7.2",
Expand Down Expand Up @@ -81,7 +81,7 @@
"CHANGELOG.md",
"packages/named-exports/index.ts",
"node_modules",
"!.*.js"
"!/.*.js"
],
"jest": {
"preset": "ts-jest",
Expand Down
2 changes: 0 additions & 2 deletions packages/imagemin/cli.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/imagemin/index.js

This file was deleted.

8 changes: 5 additions & 3 deletions packages/imagemin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
"node": ">=8.0.0"
},
"bin": {
"i": "cli.js"
"i": "lib/cli.js"
},
"main": "lib/cjs",
"module": "lib",
"es2015": "lib/es2015",
"fesm5": "lib/esm",
"types": "lib",
"dependencies": {
"esm": "^3.2.25",
"imagemin": "^7.0.0",
"imagemin-gifsicle": "^6.0.1",
"imagemin-jpegtran": "^6.0.0",
Expand All @@ -29,5 +30,6 @@
},
"publishConfig": {
"access": "public"
}
},
"sideEffects": false
}
1 change: 1 addition & 0 deletions packages/imagemin/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/node
import imagemin from '.'

Promise.all(process.argv.slice(2).map(imagemin)).catch(e => {
Expand Down
2 changes: 2 additions & 0 deletions packages/imagemin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "@1stg/tsconfig/composite",
"compilerOptions": {
"importHelpers": false,
"module": "commonjs",
"rootDir": "src",
"outDir": "lib"
}
Expand Down
2 changes: 0 additions & 2 deletions packages/rollup/cli.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/rollup/index.js

This file was deleted.

10 changes: 4 additions & 6 deletions packages/rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
"node": ">=7.0.0"
},
"bin": {
"r": "cli.js"
"r": "lib/cli.js"
},
"module": "lib",
"files": [
"*.js",
"lib"
],
"peerDependencies": {
Expand All @@ -28,9 +26,8 @@
"builtin-modules": "^3.1.0",
"commander": "^3.0.2",
"debug": "^4.1.1",
"esm": "^3.2.25",
"jsox": "^1.1.115",
"lodash-es": "^4.17.15",
"lodash": "^4.17.15",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
Expand All @@ -43,5 +40,6 @@
},
"publishConfig": {
"access": "public"
}
},
"sideEffects": false
}
3 changes: 2 additions & 1 deletion packages/rollup/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/node
import program from 'commander'
import debug from 'debug'
import JSOX from 'jsox'
import { pick } from 'lodash-es'
import { pick } from 'lodash'
import { InputOptions, OutputOptions, rollup, watch } from 'rollup'

import config, { ConfigOptions } from './config'
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import alias, { AliasOptions } from '@rxts/rollup-plugin-alias'
import builtinModules from 'builtin-modules'
import debug from 'debug'
import fs from 'fs'
import { flatMap } from 'lodash-es'
import { flatMap } from 'lodash'
import path from 'path'
import {
ModuleFormat,
Expand Down
2 changes: 2 additions & 0 deletions packages/rollup/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "@1stg/tsconfig/composite",
"compilerOptions": {
"importHelpers": false,
"module": "commonjs",
"rootDir": "src",
"outDir": "lib"
}
Expand Down
Loading

0 comments on commit cc739dd

Please sign in to comment.