-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
55 introducing profiles replace compilation targets with profiles #61
55 introducing profiles replace compilation targets with profiles #61
Conversation
Introducing Profiles: Replace compilation targets with profiles #55
* Remove default value "*" for webpackTarget property * Remove default value ["*"] for targets property Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
…rOptions to CompilationConfig Introducing Profiles: Replace compilation targets with profiles #55
…tion in WebsmithLoaderOptions Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
…rename examples to indicate the addons intention Introducing Profiles: Replace compilation targets with profiles #55
…ve unused profile property, use browser-system in tests Introducing Profiles: Replace compilation targets with profiles #55
…e test API Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Breaking: You can now use only a single property with 'profile' that should result in the same output as use of the prior 'webpackTarget' property. If you have used multiple profiles as a chain of profiles, try the new 'depends' property in the CompilationProfile configuration. Introducing Profiles: Replace compilation targets with profiles #55
+ Replace public writeable properties + Limit the compilation to a single profile Introducing Profiles: Replace compilation targets with profiles #55
…place types Introducing Profiles: Replace compilation targets with profiles #55
…tate for Compiler and TsCompiler Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
+ Move test function into production scope of module core + Remove test specific fallbacks Introducing Profiles: Replace compilation targets with profiles #55
…ectConfig to parsedCommandLine Introducing Profiles: Replace compilation targets with profiles #55
+ Adds dependency to comment-json for parsing tsconfig.json files with comments Introducing Profiles: Replace compilation targets with profiles #55
Introducing Profiles: Replace compilation targets with profiles #55
…mpilerOptions Introducing Profiles: Replace compilation targets with profiles #55
…rOptions Introducing Profiles: Replace compilation targets with profiles #55
+ Remove buildDir from CompilationContext + Remove default tsconfig.json from PROD context + Fix default tsconfig.json in TEST context + Remove duplicates when copying with deepmerge + Remove program, compilationHost and LanguageService from compiler Introducing Profiles: Replace compilation targets with profiles #55
…inimum + Replace duplicate of resolvePath with resolvePath from "core" + Reduce tsDefaults to be closer to tsc defaults + Remove program from Compiler state
+ Allow for same arguments with websmith + Provide common way of resolving a ParsedCommandLine
+ Replace WebsmithLoaderOptions with WebpackLoaderOptions + Replace more path.join with resolvePath calls + Remove Upath from project
+ Remove .js from testRegex and don't watch generated files + Remove deprecated @types declarations + Fixes linting issues in eslint.config.js
…Args + Replaces path.join and resolveProjectPath with resolvePath + Allow for overlapping relative path when merging paths + Unifies tsConfig from configFile, config param and profiles
…/o extra options resolution
+ Ensure we websmith config file is written correctly + Extract code for test file handling
+ Remove closed TODOs
}; | ||
|
||
export const createWatchHost = ( | ||
rootFiles: string[], | ||
compilerOptions: ts.CompilerOptions, | ||
tsConfig: ts.CompilerOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
War der Name vorher nicht präziser?
Ich nehme an, dass gegeben der Typ nur der "CompilerOptions" Teil, der TS Config erlaubt ist. Eventuell hättest du es auch einfach tsConfigCompilerOptions
nennen können.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tsConfig
is aligned with tsConfigFile
for the TS configuration vs. config
and configFile
for the websmith configuration. We've got a few compilerOptions and have to discriminate them somehow.
Introducing Profiles: Replace compilation targets with profiles #55
Compilation Profiles are here. This PR replaces websmith targets with a concept of compilation profiles. Choose a single profile to customize the compilation process with adjusted compiler options, different outDir and extra addons. A compilation profile can depend on other profiles, which results in a merge of compiler options and addons config. The order in the dependency chain defines the resulting options (last wins) and the order in which the addons are applied.
This PR also establishes the websmith CLI as drop-in replacement for the tsc. The tsc's CLI options are supported and same compilation results are emitted with websmith's default configuration, i.e., no addon is applied if not explicitly configured. The package '@quatico/websmith-webpack' is renamed to 'websmith-loader' as new drop-in replacement for the 'ts-loader'. Simply replace the ts-loader with same configuration and add addons or a profile to customized the compilation process.
Last but not least this PR provides in-place compilation for addons written in TS. Simply add new addon code in TS and run websmith. No need compiling the addons in advance.
Besides these major changes, this PR includes several updates to the documentation and configuration files to improve clarity and functionality. These changes involve renaming concepts related to the compilation process, adding new ESLint rules, and updating examples in the documentation:
Documentation Updates:
README.md
: Enhanced descriptions of compiler addons, renamed sections to improve readability, and updated examples to use the term "profile" instead of "target." [1] [2] [3]docs/language-glossar.md
: Replaced references to "target" with "profile" to align terminology with the updated documentation.packages/api/README.md
: Updated examples to reflect the new "profile" terminology and improved clarity on addon configuration. [1] [2]packages/api/docs/write-your-own-addon.md
: Adjusted examples and explanations to use "profile" instead of "target." [1] [2]Configuration Updates:
eslint.config.js
: Addedeslint-plugin-unicorn
to the configuration and included new rules for unicorn plugin. [1] [2] [3] [4] [5]jest-base.config.ts
: Added a new pattern tomodulePathIgnorePatterns
to exclude temporary directories from Jest tests.