Skip to content

Commit 1c831a2

Browse files
author
Daniel Del Core
committed
move pkgs to tsc bundling
1 parent a5ad460 commit 1c831a2

File tree

22 files changed

+384
-2839
lines changed

22 files changed

+384
-2839
lines changed

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"docs:start": "cd website && yarn start",
1212
"postinstall": "yarn monorepo:check",
1313
"build": "yarn build:pkgs && yarn build:community",
14-
"build:pkgs": "parcel build packages/*",
15-
"build:pkgs:watch": "parcel watch packages/*",
14+
"build:pkgs": "yarn clean && tsc --build tsconfig.packages.json",
15+
"build:pkgs:watch": "tsc --build --watch tsconfig.packages.json",
1616
"build:community": "parcel build community/*",
1717
"build:community:watch": "parcel watch community/*",
18-
"clean": "rm -rf node_modules/.cache && rimraf packages/**/{tsconfig.tsbuildinfo,lib,dist} community/**/{tsconfig.tsbuildinfo,lib,dist}",
18+
"clean": "rm -rf node_modules/.cache && rimraf packages/**/{tsconfig.tsbuildinfo,dist} community/**/{tsconfig.tsbuildinfo,dist}",
1919
"test": "jest",
2020
"test:watch": "jest --watch",
2121
"test:coverage": "jest --coverage",
22-
"validate": "yarn build && yarn lint && yarn monorepo:check && yarn community:validate",
22+
"validate": "yarn lint && yarn monorepo:check && yarn community:validate",
2323
"lint": "eslint --config .eslintrc.js --ext tsx,ts ./packages/**/src ./community/**/src",
2424
"lint:fix": "yarn lint -- --fix",
2525
"types:check": "tsc --noEmit --skipLibCheck",
@@ -45,7 +45,6 @@
4545
"@manypkg/cli": "^0.20.0",
4646
"@parcel/packager-ts": "^2.8.3",
4747
"@parcel/transformer-typescript-types": "^2.8.3",
48-
"@putout/plugin-remove-unused-variables": "^5.1.0",
4948
"@types/inquirer": "^8.2.1",
5049
"@types/jest": "^29.0.0",
5150
"@types/jscodeshift": "^0.11.6",
@@ -65,7 +64,6 @@
6564
"junk": "^3.1.0",
6665
"parcel": "^2.8.3",
6766
"prettier": "^2.0.0",
68-
"putout": "^29.5.1",
6967
"rimraf": "^2.6.3",
7068
"semver": "^7.3.5",
7169
"tar": "^6.1.0",
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/usr/bin/env node
22
const path = require('path');
33

4-
const packageJson = require('../package.json');
5-
6-
require(path.join('..', packageJson.main));
4+
require(path.join('..', 'dist', 'index.js'));

packages/cli-alias/tsconfig.json

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.packages.json",
33
"compilerOptions": {
4-
"baseUrl": "./",
5-
"target": "es6",
6-
"esModuleInterop": true,
7-
"resolveJsonModule": true,
8-
"moduleResolution": "node",
9-
"lib": [
10-
"es5",
11-
"scripthost",
12-
"es2015.core",
13-
"es2015.collection",
14-
"es2015.symbol",
15-
"es2015.iterable",
16-
"es2015.promise",
17-
"es2016",
18-
"es2017"
19-
]
4+
"rootDir": "src",
5+
"outDir": "dist"
206
},
21-
"include": ["./src/**/*.ts"]
7+
"references": [
8+
{ "path": "../types" },
9+
{ "path": "../core" },
10+
{ "path": "../fetcher" },
11+
{ "path": "../validator" },
12+
{ "path": "../initializer" },
13+
{ "path": "../fetcher" }
14+
]
2215
}

packages/cli/bin/hypermod-cli.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/usr/bin/env node
22
const path = require('path');
33

4-
const packageJson = require('../package.json');
5-
6-
require(path.join('..', packageJson.main));
4+
require(path.join('..', 'dist', 'index.js'));

packages/cli/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import init from './init';
77
import validate from './validate';
88
import { InvalidUserInputError, InvalidConfigError } from './errors';
99

10-
import packageJson from '../package.json';
10+
// import packageJson from '../package.json';
1111

1212
const program = new Command();
1313

1414
program
1515
.enablePositionalOptions()
16-
.version(packageJson.version, '-v, --version')
16+
.version('packageJson.version', '-v, --version')
1717
.name('hypermod')
1818
.argument('[path...]')
1919
.usage('[global options] <file-paths>...')

packages/cli/tsconfig.json

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.packages.json",
33
"compilerOptions": {
4-
"baseUrl": "./",
5-
"target": "es6",
6-
"esModuleInterop": true,
7-
"resolveJsonModule": true,
8-
"moduleResolution": "node",
9-
"lib": [
10-
"es5",
11-
"scripthost",
12-
"es2015.core",
13-
"es2015.collection",
14-
"es2015.symbol",
15-
"es2015.iterable",
16-
"es2015.promise",
17-
"es2016",
18-
"es2017"
19-
]
4+
"rootDir": "src",
5+
"outDir": "dist"
206
},
21-
"include": ["./src/**/*.ts"]
7+
"references": [
8+
{ "path": "../types" },
9+
{ "path": "../core" },
10+
{ "path": "../fetcher" },
11+
{ "path": "../validator" },
12+
{ "path": "../initializer" },
13+
{ "path": "../fetcher" }
14+
]
2215
}

packages/core/lib/Worker.js

Lines changed: 0 additions & 231 deletions
This file was deleted.

0 commit comments

Comments
 (0)