refactor: do not use a TS rollup plugin, but instead call tsc directly first
This commit is contained in:
parent
2e05208469
commit
0d2816fb8e
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"preset": ["presetter-preset-esm"]
|
||||
}
|
3
LICENSE
3
LICENSE
|
@ -1,6 +1,7 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
Copyright (c) 2020 Alvis HT Tang
|
||||
Copyright (c) 2023 Hammer Technologies LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@ output:
|
|||
format: es
|
||||
sourcemap: true
|
||||
plugins:
|
||||
- '@apply rollup-plugin-ts[default]'
|
||||
- '@apply rollup-plugin-tsconfig-paths[default]'
|
||||
- '@apply @rollup/plugin-node-resolve[default]'
|
||||
- - '@apply @rollup/plugin-commonjs[default]'
|
||||
- extensions:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
|
@ -24,12 +24,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"bootstrap": "presetter bootstrap && run prepare",
|
||||
"build": "run build",
|
||||
"coverage": "run coverage --",
|
||||
"lint": "run lint --",
|
||||
"prepublishOnly": "run prepare && run prepublishOnly",
|
||||
"test": "run test --",
|
||||
"watch": "run watch --"
|
||||
"build": "run build"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@rollup/plugin-commonjs": "^25.0.0",
|
||||
|
@ -38,18 +33,16 @@
|
|||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.0",
|
||||
"@rollup/plugin-yaml": "^4.0.0",
|
||||
"presetter": "workspace:*",
|
||||
"rollup": "^3.0.0",
|
||||
"rollup-plugin-postcss": "^4.0.0",
|
||||
"rollup-plugin-ts": "^3.0.0",
|
||||
"rollup-plugin-tsconfig-paths": "^1.0.0",
|
||||
"rollup-plugin-visualizer": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"presetter": "workspace:*"
|
||||
"presetter": "^4.0.1",
|
||||
"presetter-preset-esm": "^4.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"presetter-types": "workspace:*",
|
||||
"presetter-types": "^4.0.1",
|
||||
"type-fest": "^3.12.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ export default function (): PresetAsset {
|
|||
return template(content, variable);
|
||||
/* eslint-enable @typescript-eslint/naming-convention */
|
||||
},
|
||||
'tsconfig.config.json': resolve(TEMPLATES, 'tsconfig.config.yaml'),
|
||||
},
|
||||
scripts: resolve(TEMPLATES, 'scripts.yaml'),
|
||||
noSymlinks: ['rollup.config.ts'],
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# replace the `prepare` template from presetter-preset
|
||||
# so that the build procedure will not be triggered upon package installation
|
||||
build: cross-env NODE_ENV=production run-s clean build:rollup
|
||||
build:rollup: rollup --config rollup.config.ts --configPlugin rollup-plugin-ts
|
||||
build: cross-env NODE_ENV=production run-s clean build:rollup-config build:rollup
|
||||
build:rollup-config: tsc -p tsconfig.config.json rollup.config.ts
|
||||
build:rollup: rollup --config rollup.config.js
|
||||
develop: cross-env NODE_ENV=development run-s "build:rollup -- --watch {@}" --
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
extends: .
|
||||
include:
|
||||
- '.'
|
||||
compilerOptions:
|
||||
# emittance
|
||||
outDir: '.'
|
Loading…
Reference in New Issue