weapp-tailwindcss 5.1.15 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +6 -0
- package/README.md +6 -0
- package/bin/{weapp-tailwindcss.js → weapp-tailwindcss.cjs} +1 -1
- package/dist/bundlers/framework-selector.d.ts +2 -2
- package/dist/bundlers/gulp/asset-emission-plan.d.ts +10 -0
- package/dist/bundlers/gulp/frameworks/native/index.d.ts +10 -3
- package/dist/bundlers/gulp/index.d.ts +10 -3
- package/dist/bundlers/gulp/module-graph.d.ts +1 -1
- package/dist/bundlers/gulp/runtime-snapshot.d.ts +4 -2
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/cache-state.d.ts +71 -0
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +45 -0
- package/dist/bundlers/gulp/shared/create-native-framework-plugins.d.ts +9 -2
- package/dist/bundlers/rspack/index.d.ts +2 -2
- package/dist/bundlers/shared/cache.d.ts +1 -1
- package/dist/bundlers/shared/css-imports.d.ts +1 -1
- package/dist/bundlers/shared/css-source-trace.d.ts +2 -2
- package/dist/bundlers/shared/framework-postcss.d.ts +21 -0
- package/dist/bundlers/shared/generator-css/candidates.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +19 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +25 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +30 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/source-order.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +4 -72
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +5 -3
- package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +58 -0
- package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/result-helpers.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/scoped-rules.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +32 -0
- package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +13 -5
- package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +16 -0
- package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +4 -4
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +7 -9
- package/dist/bundlers/shared/generator-css/types.d.ts +12 -3
- package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +9 -0
- package/dist/bundlers/shared/generator-css/user-css/at-rules.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +9 -0
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +10 -0
- package/dist/bundlers/shared/generator-css/user-css/user-layers.d.ts +15 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -33
- package/dist/bundlers/shared/generator-css/validate.d.ts +1 -1
- package/dist/bundlers/shared/generator-css.d.ts +9 -10
- package/dist/bundlers/shared/runtime-class-set/entries.d.ts +4 -0
- package/dist/bundlers/shared/runtime-class-set/escaped-candidates.d.ts +9 -0
- package/dist/bundlers/shared/runtime-class-set.d.ts +30 -0
- package/dist/bundlers/shared/runtime-entry-type.d.ts +8 -0
- package/dist/bundlers/shared/runtime-signatures.d.ts +8 -0
- package/dist/bundlers/shared/source-candidate-scan-signature.d.ts +13 -0
- package/dist/bundlers/shared/source-candidates/collector.d.ts +8 -0
- package/dist/bundlers/shared/source-candidates/scan-root.d.ts +10 -0
- package/dist/bundlers/{vite → shared}/source-candidates/script.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/store.d.ts +2 -0
- package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +69 -0
- package/dist/bundlers/shared/source-candidates.d.ts +4 -0
- package/dist/bundlers/shared/source-scan/css-entries.d.ts +18 -0
- package/dist/bundlers/shared/source-scan.d.ts +16 -0
- package/dist/bundlers/shared/static-config-content.d.ts +5 -0
- package/dist/bundlers/shared/v4-generation-core.d.ts +9 -1
- package/dist/bundlers/vite/bundle-entries.d.ts +1 -1
- package/dist/bundlers/vite/bundle-state.d.ts +11 -38
- package/dist/bundlers/vite/css-asset-identity.d.ts +11 -0
- package/dist/bundlers/vite/css-finalizer/options.d.ts +54 -0
- package/dist/bundlers/vite/css-finalizer/plugin.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -43
- package/dist/bundlers/vite/css-memory.d.ts +1 -2
- package/dist/bundlers/vite/frameworks/generic/index.d.ts +2 -2
- package/dist/bundlers/vite/frameworks/taro/index.d.ts +2 -2
- package/dist/bundlers/vite/frameworks/uni-app/index.d.ts +3 -3
- package/dist/bundlers/vite/frameworks/uni-app-x/index.d.ts +3 -3
- package/dist/bundlers/vite/frameworks/weapp-vite/index.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/asset-emission-plan.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle/bundle-markup-candidates.d.ts +4 -4
- package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-assets.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-cache-task.d.ts +34 -0
- package/dist/bundlers/vite/generate-bundle/css-composition-plan.d.ts +58 -0
- package/dist/bundlers/vite/generate-bundle/css-config-directives.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-entry-processing.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-output-helpers.d.ts +21 -2
- package/dist/bundlers/vite/generate-bundle/css-output.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-source-plan.d.ts +19 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +61 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-result.d.ts +23 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +42 -0
- package/dist/bundlers/vite/generate-bundle/final-css-assets.d.ts +3 -2
- package/dist/bundlers/vite/generate-bundle/finalize/bundle.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/finalize/root-import-shell.d.ts +69 -0
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +2 -70
- package/dist/bundlers/vite/generate-bundle/html-processing.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/js-processing.d.ts +6 -5
- package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/remembered-css-plan.d.ts +35 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +5 -6
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/root-style-output.d.ts +20 -0
- package/dist/bundlers/vite/generate-bundle/runtime-configured-css.d.ts +54 -0
- package/dist/bundlers/vite/generate-bundle/runtime-linked-css.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/runtime-linked-source-memory.d.ts +3 -3
- package/dist/bundlers/vite/generate-bundle/runtime.d.ts +6 -0
- package/dist/bundlers/vite/generate-bundle/scoped-generator.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/signatures.d.ts +1 -8
- package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +3 -3
- package/dist/bundlers/vite/generate-bundle/source-candidate-source.d.ts +5 -0
- package/dist/bundlers/vite/generate-bundle/subpackages.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +14 -1
- package/dist/bundlers/vite/generate-bundle/transform-filter.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/transform-scheduling.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/types.d.ts +8 -7
- package/dist/bundlers/vite/generate-bundle/uni-app-x-postprocess.d.ts +3 -2
- package/dist/bundlers/vite/generate-bundle/validate-runtime-candidates.d.ts +22 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +7 -7
- package/dist/bundlers/vite/incremental-runtime-class-set/entries.d.ts +1 -4
- package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +1 -3
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +2 -30
- package/dist/bundlers/vite/index.d.ts +3 -3
- package/dist/bundlers/vite/js-precheck.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +13 -0
- package/dist/bundlers/vite/processed-css-assets/collector.d.ts +4 -0
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +34 -0
- package/dist/bundlers/vite/processed-css-assets/empty-at-rule.d.ts +1 -0
- package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +42 -0
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +89 -0
- package/dist/bundlers/vite/processed-css-assets/style-files.d.ts +3 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +4 -71
- package/dist/bundlers/vite/resolve-app-type.d.ts +1 -1
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +3 -1
- package/dist/bundlers/vite/runtime-affecting-signature.d.ts +1 -2
- package/dist/bundlers/vite/runtime-candidate-entry.d.ts +9 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +4 -4
- package/dist/bundlers/vite/serve-css-generation.d.ts +2 -0
- package/dist/bundlers/vite/serve-js-transform.d.ts +1 -1
- package/dist/bundlers/vite/serve-root-import-shell.d.ts +1 -1
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +2 -0
- package/dist/bundlers/vite/shared/create-framework-plugins.d.ts +8 -8
- package/dist/bundlers/vite/shared/framework-hmr-candidate-state.d.ts +45 -0
- package/dist/bundlers/vite/shared/framework-post-plugin.d.ts +2 -0
- package/dist/bundlers/vite/shared/framework-processed-css-registry.d.ts +22 -0
- package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +1 -0
- package/dist/bundlers/vite/shared/framework-source-candidates-plugin.d.ts +2 -0
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +38 -0
- package/dist/bundlers/vite/shared/framework-strategy.d.ts +4 -4
- package/dist/bundlers/vite/source-candidate-scan-signature.d.ts +2 -13
- package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -10
- package/dist/bundlers/vite/source-candidates.d.ts +1 -68
- package/dist/bundlers/vite/source-output-relations.d.ts +24 -0
- package/dist/bundlers/vite/source-scan/css-entries.d.ts +2 -18
- package/dist/bundlers/vite/source-scan.d.ts +2 -16
- package/dist/bundlers/vite/static-config-content.d.ts +1 -5
- package/dist/bundlers/vite/uni-app-x-css-options.d.ts +1 -1
- package/dist/bundlers/vite/web-css-compat.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/asset-emission-plan.d.ts +18 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/css-source-resolvers.d.ts +2 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/finalize-assets.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-result.d.ts +3 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-task.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +11 -41
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/html-js-tasks.d.ts +5 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/js-module-graph.d.ts +4 -10
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +30 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +8 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/memory-trace.d.ts +78 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +43 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/resources.d.ts +30 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/runtime-candidates.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +28 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +21 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +9 -219
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +4 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +3 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-refresh.d.ts +3 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +2 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +8 -4
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/generic/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/index.d.ts +7 -7
- package/dist/bundlers/webpack/frameworks/mpx/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/taro/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/uni-app/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/weapp-vite/index.d.ts +2 -2
- package/dist/bundlers/webpack/index.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +7 -2
- package/dist/bundlers/webpack/loaders/weapp-tw-css-generation-loader.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +1 -1
- package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +20 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin/watch-output.d.ts +13 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin.d.ts +3 -21
- package/dist/cli/context.d.ts +2 -2
- package/dist/cli/doctor.d.ts +1 -1
- package/dist/cli/helpers/options.d.ts +3 -3
- package/dist/cli/helpers.d.ts +1 -1
- package/dist/cli.cjs +37012 -0
- package/dist/cli.js +145 -176
- package/dist/compiler/artifact.d.ts +14 -0
- package/dist/compiler/candidate-index.d.ts +10 -0
- package/dist/compiler/compilation-change-coordinator.d.ts +28 -0
- package/dist/compiler/compilation-dependency-state.d.ts +16 -0
- package/dist/compiler/compilation-scope-graph.d.ts +31 -0
- package/dist/compiler/compilation-session-pool.d.ts +54 -0
- package/dist/compiler/compiler-owner-state.d.ts +3 -0
- package/dist/compiler/composition.d.ts +8 -0
- package/dist/compiler/emission-plan.d.ts +26 -0
- package/dist/compiler/index.d.ts +23 -0
- package/dist/compiler/invalidation.d.ts +3 -0
- package/dist/compiler/mode.d.ts +3 -0
- package/dist/compiler/owner-lifecycle.d.ts +1 -0
- package/dist/compiler/platform-adapter.d.ts +9 -0
- package/dist/compiler/runtime-affecting-signature.d.ts +2 -0
- package/dist/compiler/runtime-build-state.d.ts +6 -0
- package/dist/compiler/runtime-snapshot.d.ts +53 -0
- package/dist/compiler/scope-planner.d.ts +6 -0
- package/dist/compiler/semantic-css.d.ts +66 -0
- package/dist/compiler/session.d.ts +13 -0
- package/dist/compiler/shadow-gate.d.ts +26 -0
- package/dist/compiler/shadow-report-session.d.ts +37 -0
- package/dist/compiler/shadow-report.d.ts +15 -0
- package/dist/compiler/source-graph.d.ts +32 -0
- package/dist/compiler/tailwind-generation-session-pool.d.ts +22 -0
- package/dist/compiler/types.d.ts +95 -0
- package/dist/constants.d.ts +2 -2
- package/dist/context/compiler-context-cache.d.ts +1 -1
- package/dist/context/custom-attributes.d.ts +1 -1
- package/dist/context/handlers.d.ts +3 -3
- package/dist/context/index.d.ts +1 -1
- package/dist/context/runtime-package-replacements.d.ts +1 -1
- package/dist/context/style-options.d.ts +1 -1
- package/dist/context/tailwindcss.d.ts +3 -3
- package/dist/{context-VeFq_8vW.js → context-PZXBqrAJ.cjs} +32 -94
- package/dist/{context-BgGWVAmN.mjs → context-oTkxC5aZ.js} +23 -12
- package/dist/{core.mjs → core.cjs} +13 -12
- package/dist/core.d.ts +2 -2
- package/dist/core.js +12 -13
- package/dist/css-imports-DfNC3e6a.cjs +43 -0
- package/dist/css-loader-runtime-CSv0lKqV.cjs +11 -0
- package/dist/css-macro/postcss.cjs +19 -0
- package/dist/css-macro/postcss.js +2 -19
- package/dist/{css-macro.mjs → css-macro.cjs} +11 -8
- package/dist/css-macro.d.ts +2 -2
- package/dist/css-macro.js +8 -11
- package/dist/{defaults.mjs → defaults.cjs} +16 -11
- package/dist/defaults.d.ts +1 -1
- package/dist/defaults.js +11 -16
- package/dist/{escape.mjs → escape.cjs} +18 -4
- package/dist/escape.js +4 -18
- package/dist/framework/platform.d.ts +1 -1
- package/dist/{framework.mjs → framework.cjs} +47 -25
- package/dist/framework.d.ts +1 -1
- package/dist/framework.js +25 -47
- package/dist/generator/index.d.ts +6 -6
- package/dist/generator/options.d.ts +3 -3
- package/dist/generator/types.d.ts +2 -2
- package/dist/{generator-CEnUsjed.js → generator-C8D5cnbe.cjs} +730 -468
- package/dist/{generator-CEo920So.mjs → generator-CDdzqf1S.js} +747 -497
- package/dist/generator.cjs +12 -0
- package/dist/generator.d.ts +1 -1
- package/dist/generator.js +2 -12
- package/dist/{gulp-3m1dAiig.js → gulp-Cjcss8T_.cjs} +326 -241
- package/dist/{gulp-DP71z1jG.mjs → gulp-DNXQvDUw.js} +316 -234
- package/dist/gulp.cjs +5 -0
- package/dist/gulp.d.ts +4 -4
- package/dist/gulp.js +2 -5
- package/dist/{hmr-timing-1aS6--U7.mjs → hmr-timing-CuJwQzDc.js} +5230 -3259
- package/dist/hmr-timing-DMLfNfGG.cjs +555 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -45
- package/dist/js/JsTokenUpdater.d.ts +1 -1
- package/dist/js/ModuleGraph.d.ts +3 -3
- package/dist/js/NodePathWalker.d.ts +2 -2
- package/dist/js/babel/process.d.ts +2 -2
- package/dist/js/babel.d.ts +8 -8
- package/dist/js/evalTransforms.d.ts +2 -2
- package/dist/js/fast-path/oxc.d.ts +1 -1
- package/dist/js/handlers.d.ts +2 -2
- package/dist/js/index.d.ts +3 -3
- package/dist/js/literal-transform.d.ts +1 -1
- package/dist/js/module-graph/ignored-exports.d.ts +4 -4
- package/dist/js/module-graph/types.d.ts +2 -2
- package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
- package/dist/js/precheck.d.ts +1 -1
- package/dist/js/replacement-cache.d.ts +1 -1
- package/dist/js/sourceAnalysis.d.ts +3 -3
- package/dist/js/taggedTemplateIgnore.d.ts +1 -1
- package/dist/object-Bvy6-w9r.js +47 -0
- package/dist/object-C_Vr6_S5.cjs +58 -0
- package/dist/options-DlvhQwWB.cjs +775 -0
- package/dist/pipeline-helpers-XtUmUlci.cjs +955 -0
- package/dist/postcss-html-transform.cjs +7 -0
- package/dist/postcss-html-transform.js +3 -5
- package/dist/postcss.cjs +15 -0
- package/dist/postcss.js +7 -11
- package/dist/presets/hbuilderx.d.ts +2 -2
- package/dist/presets/index.d.ts +4 -4
- package/dist/presets/shared.d.ts +1 -1
- package/dist/presets/taro.d.ts +2 -2
- package/dist/presets/uni-app-x.d.ts +1 -1
- package/dist/presets/uni-app.d.ts +2 -2
- package/dist/{presets.mjs → presets.cjs} +37 -24
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +24 -36
- package/dist/reset.cjs +19 -0
- package/dist/reset.d.ts +2 -2
- package/dist/reset.js +2 -19
- package/dist/{rolldown-runtime-emK7D4bc.js → rolldown-runtime-CVvi-lCc.cjs} +15 -0
- package/dist/{rspack.mjs → rspack.cjs} +10 -4
- package/dist/rspack.d.ts +3 -3
- package/dist/rspack.js +4 -10
- package/dist/runtime-branch/create-branch.d.ts +1 -1
- package/dist/runtime-branch/generator-target-env.d.ts +1 -1
- package/dist/runtime-branch/index.d.ts +2 -2
- package/dist/runtime-branch/mini-program.d.ts +1 -1
- package/dist/runtime-branch/native-app.d.ts +1 -1
- package/dist/runtime-branch/platform.d.ts +2 -2
- package/dist/runtime-branch/tailwind-version.d.ts +1 -1
- package/dist/runtime-branch/types.d.ts +2 -2
- package/dist/runtime-branch/web.d.ts +1 -1
- package/dist/runtime-branch.d.ts +1 -1
- package/dist/runtime-registry-Y7NrD2WH.cjs +31 -0
- package/dist/shared/classname-transform.d.ts +1 -1
- package/dist/shared/mpx-plugin-owner.d.ts +2 -0
- package/dist/shared/mpx.d.ts +1 -1
- package/dist/{source-candidate-scan-signature-Cf7259PR.mjs → source-candidate-scan-signature-B0S7f5P7.js} +26 -336
- package/dist/{source-candidate-scan-signature-BAahhiwb.js → source-candidate-scan-signature-BmSuoxR9.cjs} +31 -414
- package/dist/style-injector/internal.d.ts +6 -6
- package/dist/style-options-CEfXwZzX.cjs +75 -0
- package/dist/tailwindcss/candidates.d.ts +2 -2
- package/dist/tailwindcss/index.d.ts +1 -1
- package/dist/tailwindcss/runtime/cache.d.ts +1 -1
- package/dist/tailwindcss/runtime-factory.d.ts +2 -2
- package/dist/tailwindcss/runtime-options.d.ts +1 -1
- package/dist/tailwindcss/runtime-types.d.ts +2 -2
- package/dist/tailwindcss/runtime.d.ts +2 -2
- package/dist/tailwindcss/source-scan.d.ts +2 -2
- package/dist/tailwindcss/targets.d.ts +1 -1
- package/dist/tailwindcss/v4/config.d.ts +1 -1
- package/dist/tailwindcss/v4/css-sources.d.ts +2 -1
- package/dist/tailwindcss/v4/index.d.ts +2 -2
- package/dist/tailwindcss/v4/multi-runtime.d.ts +1 -1
- package/dist/tailwindcss/v4/runtime-factory.d.ts +5 -5
- package/dist/tailwindcss/v4/runtime-options.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/css-macro-source.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/cache-stats.d.ts +26 -0
- package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/engine.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +51 -0
- package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +17 -0
- package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +2 -1
- package/dist/tailwindcss/v4-engine/generator.d.ts +2 -28
- package/dist/tailwindcss/v4-engine/index.d.ts +5 -5
- package/dist/tailwindcss/v4-engine/miniprogram.d.ts +2 -2
- package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
- package/dist/tailwindcss/v4-engine/types.d.ts +1 -0
- package/dist/{tailwindcss-KBYPJ2DW.js → tailwindcss-Cs94gJgf.cjs} +10 -770
- package/dist/{tailwindcss-xs704TRw.mjs → tailwindcss-D7TGiZR2.js} +23 -23
- package/dist/transform-BUEyOCT7.cjs +341 -0
- package/dist/transform-BbaPIji9.js +342 -0
- package/dist/typedoc.export.d.ts +4 -4
- package/dist/types/index.d.ts +7 -7
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/typedoc-tailwindcss-runtime.d.ts +3 -3
- package/dist/types/user-defined-options/general.d.ts +5 -5
- package/dist/types/user-defined-options/important.d.ts +2 -2
- package/dist/types/user-defined-options/index.d.ts +9 -9
- package/dist/types/user-defined-options/matcher.d.ts +2 -2
- package/dist/types.cjs +0 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -0
- package/dist/uni-app-x/harmony.d.ts +1 -0
- package/dist/uni-app-x/index.d.ts +2 -2
- package/dist/uni-app-x/options.d.ts +1 -1
- package/dist/uni-app-x/style-asset/harmony-apply.d.ts +1 -0
- package/dist/uni-app-x/style-asset/style-value.d.ts +3 -0
- package/dist/uni-app-x/style-asset.d.ts +5 -4
- package/dist/uni-app-x/transform.d.ts +1 -1
- package/dist/uni-app-x/vite/harmony-apply.d.ts +19 -0
- package/dist/uni-app-x/vite/native-target.d.ts +2 -0
- package/dist/uni-app-x/vite.d.ts +5 -2
- package/dist/unocss/index.d.ts +1 -1
- package/dist/utils/disabled.d.ts +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/{hmr-timing-B8p4f0ca.js → v4-generation-core-D7MuR5ZF.cjs} +4886 -3330
- package/dist/{vite-nXZEiwG0.mjs → vite-BI1TeUPO.js} +6148 -4522
- package/dist/{vite-DUVjMduj.js → vite-CBzmUTu-.cjs} +6267 -4666
- package/dist/vite.cjs +4 -0
- package/dist/vite.d.ts +3 -3
- package/dist/vite.js +2 -4
- package/dist/watch-dependencies-BZGubvuJ.cjs +40 -0
- package/dist/{weapp-tw-css-generation-loader.js → weapp-tw-css-generation-loader.cjs} +3 -2
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +201 -0
- package/dist/{weapp-tw-runtime-classset-loader.js → weapp-tw-runtime-classset-loader.cjs} +19 -15
- package/dist/{webpack-nppysF4B.js → webpack-Dao6bWEj.cjs} +1000 -1473
- package/dist/{webpack-C_UUFRgj.mjs → webpack-dAY9h8r8.js} +1462 -1185
- package/dist/webpack.cjs +5 -0
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +2 -5
- package/dist/wxml/Tokenizer.d.ts +2 -2
- package/dist/wxml/custom-attributes.d.ts +1 -1
- package/dist/wxml/index.d.ts +2 -2
- package/dist/wxml/shared.d.ts +1 -1
- package/dist/wxml/utils/codegen/legacy-rewriter.d.ts +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
- package/dist/wxml/utils/codegen.d.ts +1 -1
- package/dist/wxml/utils/custom-template.d.ts +2 -2
- package/dist/wxml/utils/fragment-helpers.d.ts +2 -2
- package/dist/wxml/utils/fragment-updater.d.ts +2 -2
- package/dist/wxml/utils/template-fragments.d.ts +2 -2
- package/dist/wxml/utils.d.ts +5 -5
- package/dist/wxml-DSMNuUaP.cjs +38609 -0
- package/dist/{cli.mjs → wxml-IBzZSaQC.js} +237 -718
- package/package.json +59 -54
- package/dist/css-macro/postcss.mjs +0 -2
- package/dist/generator.mjs +0 -2
- package/dist/gulp.mjs +0 -2
- package/dist/index.mjs +0 -9
- package/dist/object-BJSWl-E5.mjs +0 -9
- package/dist/object-COs_Mw6p.js +0 -14
- package/dist/postcss-html-transform.mjs +0 -5
- package/dist/postcss.mjs +0 -11
- package/dist/reset.mjs +0 -2
- package/dist/transform-B_KM9sLX.mjs +0 -14930
- package/dist/transform-CcYptivi.js +0 -14927
- package/dist/types.mjs +0 -1
- package/dist/vite.mjs +0 -2
- package/dist/watch-dependencies-bpG6kmAf.js +0 -80
- package/dist/weapp-tw-css-import-rewrite-loader-DNk0IxAt.js +0 -10198
- package/dist/weapp-tw-css-import-rewrite-loader.js +0 -10
- package/dist/webpack.mjs +0 -2
- package/dist/wxml-Ce10eREX.js +0 -3979
- package/dist/wxml-DdGdeqaH.mjs +0 -3861
- /package/dist/{auto-2dg_uhEJ.mjs → auto-2dg_uhEJ.js} +0 -0
- /package/dist/{auto-DtU6f3X6.js → auto-DtU6f3X6.cjs} +0 -0
- /package/dist/bundlers/{vite → shared}/source-scan/dependencies.d.ts +0 -0
- /package/dist/{cache-options-DavPxrhC.js → cache-options-DavPxrhC.cjs} +0 -0
- /package/dist/{cache-options-DwBtLwQe.mjs → cache-options-DwBtLwQe.js} +0 -0
- /package/dist/{logger-BNzxZbZj.mjs → logger-BNzxZbZj.js} +0 -0
- /package/dist/{logger-TlKT3xmR.js → logger-TlKT3xmR.cjs} +0 -0
- /package/dist/{utils-CuKLf1Zv.js → utils-CuKLf1Zv.cjs} +0 -0
- /package/dist/{utils-MVwpU07P.mjs → utils-MVwpU07P.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as getRuntimeClassSetSignature, p as
|
|
3
|
-
import { y as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Pt as getTailwindV4IncrementalGenerateCacheStats, Q as hasTailwindRootDirectives, _ as upsertTailwindV4CssSource, et as normalizeTailwindConfigDirectives, g as removeTailwindV4CssSource, h as hasConfiguredTailwindV4CssRoots, nt as normalizeTailwindSourceForGenerator, vt as prependConfigDirective } from "./generator-CDdzqf1S.js";
|
|
2
|
+
import { l as getRuntimeClassSetSignature, p as resolveSourceScanEntries } from "./tailwindcss-D7TGiZR2.js";
|
|
3
|
+
import { $ as createCompilationDependencyChanges, C as createBundlerGeneratedCssMarker, D as annotateCssSourceTrace, E as stripBundlerGeneratedCssMarkers, G as createRuntimeAffectingSourceSignature, H as removeRuntimeCompilationBuildStateFiles, I as rewriteLocalCssImportRequestsForOutput, J as getCompilerShadowRunSnapshot, K as disposeCompilerOwner, L as splitLocalCssImports, M as createRuntimeClassSetManager, O as createCssSourceTraceCacheSignature, Q as recordCompilationDependencyChanges, R as finalizeCompilerShadowRun, V as createRuntimeCompilationBuildState, W as updateRuntimeCompilationBuildState, X as getCompilationScopeDependencyRevision, Y as AssetEmissionPlan, Z as invalidateCompilationScope, et as createSourceCandidateCollector, j as processCachedTask, k as createCssTokenSourceMap, n as emitHmrTiming, q as beginCompilerShadowRun, r as generateTailwindV4Css, w as hasBundlerGeneratedCssMarker, y as finalizeMiniProgramGeneratorCss, z as buildRuntimeCompilationSnapshot } from "./hmr-timing-CuJwQzDc.js";
|
|
4
|
+
import { h as createDebug } from "./wxml-IBzZSaQC.js";
|
|
5
|
+
import { l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-oTkxC5aZ.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import process from "node:process";
|
|
@@ -60,72 +60,20 @@ function createGulpModuleGraphOptions(opts) {
|
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region src/bundlers/gulp/runtime-snapshot.ts
|
|
63
|
-
function createGulpRuntimeSnapshot(runtimeSourcesByFile,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
entries: [...runtimeSourcesByFile.entries()].map(([file, entry]) => ({
|
|
76
|
-
file,
|
|
77
|
-
output: {
|
|
78
|
-
fileName: file,
|
|
79
|
-
source: entry.source,
|
|
80
|
-
type: "asset"
|
|
81
|
-
},
|
|
82
|
-
source: entry.source,
|
|
83
|
-
type: entry.type
|
|
84
|
-
})),
|
|
85
|
-
jsEntries: /* @__PURE__ */ new Map(),
|
|
86
|
-
sourceHashByFile: /* @__PURE__ */ new Map(),
|
|
87
|
-
runtimeAffectingSignatureByFile: /* @__PURE__ */ new Map(),
|
|
88
|
-
runtimeAffectingHashByFile: /* @__PURE__ */ new Map(),
|
|
89
|
-
hasOmittedKnownFiles: false,
|
|
90
|
-
changedByType: {
|
|
91
|
-
html: /* @__PURE__ */ new Set(),
|
|
92
|
-
js: /* @__PURE__ */ new Set(),
|
|
93
|
-
css: /* @__PURE__ */ new Set(),
|
|
94
|
-
other: /* @__PURE__ */ new Set()
|
|
95
|
-
},
|
|
96
|
-
runtimeAffectingChangedByType,
|
|
97
|
-
processFiles: {
|
|
98
|
-
html: /* @__PURE__ */ new Set(),
|
|
99
|
-
js: /* @__PURE__ */ new Set(),
|
|
100
|
-
css: /* @__PURE__ */ new Set()
|
|
101
|
-
},
|
|
102
|
-
linkedImpactsByEntry: /* @__PURE__ */ new Map()
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region src/bundlers/gulp/vinyl-transform.ts
|
|
107
|
-
const Transform = stream.Transform;
|
|
108
|
-
function createVinylTransform(phase, handler, getTimingDetails) {
|
|
109
|
-
return new Transform({
|
|
110
|
-
objectMode: true,
|
|
111
|
-
async transform(file, _encoding, callback) {
|
|
112
|
-
const hmrTimingStartedAt = performance.now();
|
|
113
|
-
try {
|
|
114
|
-
await handler(file);
|
|
115
|
-
emitHmrTiming("gulp", phase, performance.now() - hmrTimingStartedAt, {
|
|
116
|
-
file: file.relative || path.basename(file.path),
|
|
117
|
-
...getTimingDetails?.(file)
|
|
118
|
-
});
|
|
119
|
-
callback(null, file);
|
|
120
|
-
} catch (error) {
|
|
121
|
-
callback(error, file);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
63
|
+
function createGulpRuntimeSnapshot(runtimeSourcesByFile, state, computeHash, options = {}) {
|
|
64
|
+
return buildRuntimeCompilationSnapshot([...runtimeSourcesByFile.entries()].map(([file, entry]) => ({
|
|
65
|
+
file,
|
|
66
|
+
runtimeCandidate: true,
|
|
67
|
+
source: entry.source,
|
|
68
|
+
type: entry.type
|
|
69
|
+
})), state, {
|
|
70
|
+
computeHash,
|
|
71
|
+
createRuntimeAffectingSignature: createRuntimeAffectingSourceSignature,
|
|
72
|
+
removedFiles: options.removedFiles
|
|
124
73
|
});
|
|
125
74
|
}
|
|
126
75
|
//#endregion
|
|
127
|
-
//#region src/bundlers/gulp/shared/create-native-framework-plugins.ts
|
|
128
|
-
const debug = createDebug();
|
|
76
|
+
//#region src/bundlers/gulp/shared/create-native-framework-plugins/cache-state.ts
|
|
129
77
|
const GULP_RUNTIME_SOURCE_CACHE_MAX = 256;
|
|
130
78
|
const GULP_PROCESS_CACHE_MAX = 512;
|
|
131
79
|
function toMb(bytes) {
|
|
@@ -135,13 +83,15 @@ function touchMapEntry(map, key, value) {
|
|
|
135
83
|
map.delete(key);
|
|
136
84
|
map.set(key, value);
|
|
137
85
|
}
|
|
138
|
-
function pruneGulpRuntimeSourceCaches(
|
|
86
|
+
function pruneGulpRuntimeSourceCaches(sourcesByFile) {
|
|
87
|
+
const removedFiles = [];
|
|
139
88
|
while (sourcesByFile.size > GULP_RUNTIME_SOURCE_CACHE_MAX) {
|
|
140
89
|
const oldestKey = sourcesByFile.keys().next().value;
|
|
141
90
|
if (typeof oldestKey !== "string") break;
|
|
142
91
|
sourcesByFile.delete(oldestKey);
|
|
143
|
-
|
|
92
|
+
removedFiles.push(oldestKey);
|
|
144
93
|
}
|
|
94
|
+
return removedFiles;
|
|
145
95
|
}
|
|
146
96
|
function rememberGulpProcessCacheKey(cacheKeys, key) {
|
|
147
97
|
cacheKeys.delete(key);
|
|
@@ -186,6 +136,227 @@ function resolveGulpMemoryDebugStats(context) {
|
|
|
186
136
|
tailwind: { v4: getTailwindV4IncrementalGenerateCacheStats() }
|
|
187
137
|
};
|
|
188
138
|
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/bundlers/gulp/asset-emission-plan.ts
|
|
141
|
+
function applyGulpAssetEmissionPlan(plan, options) {
|
|
142
|
+
for (const operation of plan.operations()) {
|
|
143
|
+
if (operation.kind === "delete") {
|
|
144
|
+
options.deleteAsset(operation.assetId);
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
options.writeAsset(operation.assetId, typeof operation.source === "string" ? Buffer.from(operation.source) : Buffer.from(operation.source));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function writeGulpFileAsset(file, source) {
|
|
151
|
+
const plan = new AssetEmissionPlan();
|
|
152
|
+
plan.write(file.path, source);
|
|
153
|
+
applyGulpAssetEmissionPlan(plan, {
|
|
154
|
+
deleteAsset(assetId) {
|
|
155
|
+
if (assetId === file.path) file.contents = null;
|
|
156
|
+
},
|
|
157
|
+
writeAsset(assetId, contents) {
|
|
158
|
+
if (assetId === file.path) file.contents = contents;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/bundlers/gulp/vinyl-transform.ts
|
|
164
|
+
const Transform = stream.Transform;
|
|
165
|
+
function createVinylTransform(phase, handler, getTimingDetails) {
|
|
166
|
+
return new Transform({
|
|
167
|
+
objectMode: true,
|
|
168
|
+
async transform(file, _encoding, callback) {
|
|
169
|
+
const hmrTimingStartedAt = performance.now();
|
|
170
|
+
try {
|
|
171
|
+
await handler(file);
|
|
172
|
+
emitHmrTiming("gulp", phase, performance.now() - hmrTimingStartedAt, {
|
|
173
|
+
file: file.relative || path.basename(file.path),
|
|
174
|
+
...getTimingDetails?.(file)
|
|
175
|
+
});
|
|
176
|
+
callback(null, file);
|
|
177
|
+
} catch (error) {
|
|
178
|
+
callback(error, file);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.ts
|
|
185
|
+
function createGulpFileTransforms(context) {
|
|
186
|
+
const { cache, createRuntimeSetHash, debug, generatedCssPreflightModeByFile, getCompilationDependencyRevision, getSourceCandidateGetter, getSourceCandidateSourceGetter, getRuntimeSet, gulpProcessCacheKeys, opts, refreshGulpV4SourceCandidates, refreshRuntimeSet, refreshRuntimeSetForSource, registerAutoCssSource, rememberCompilationScope, resolveGulpStyleOutputExtension, resolveGulpTransformTimingDetails, resolveModuleGraphOptions, resolveWxmlHandlerOptions, resolveWxssFileHandlerOptions, resolveWxssUserHandlerOptions, runtimeState } = context;
|
|
187
|
+
const { templateHandler, styleHandler, jsHandler } = opts;
|
|
188
|
+
function createWxssTransform(options, stage) {
|
|
189
|
+
return createVinylTransform(`css:${stage}`, async (file) => {
|
|
190
|
+
if (!file.contents) return;
|
|
191
|
+
const rawSource = file.contents.toString();
|
|
192
|
+
const cssSourceChanged = await registerAutoCssSource(file, rawSource);
|
|
193
|
+
const shouldUseGenerator = runtimeState.tailwindRuntime.majorVersion === 4;
|
|
194
|
+
let gulpSourceCandidateGetter = getSourceCandidateGetter();
|
|
195
|
+
if (shouldUseGenerator) gulpSourceCandidateGetter = await refreshGulpV4SourceCandidates(cssSourceChanged);
|
|
196
|
+
const nextRuntimeSet = await refreshRuntimeSet({
|
|
197
|
+
forceRefresh: cssSourceChanged,
|
|
198
|
+
forceCollect: cssSourceChanged,
|
|
199
|
+
clearCache: cssSourceChanged
|
|
200
|
+
});
|
|
201
|
+
const sourceCandidateSourceGetter = getSourceCandidateSourceGetter();
|
|
202
|
+
const sourceTraceTokenSources = sourceCandidateSourceGetter ? createCssTokenSourceMap(sourceCandidateSourceGetter(void 0), opts) : void 0;
|
|
203
|
+
const sourceTraceSignature = createCssSourceTraceCacheSignature(sourceTraceTokenSources, opts);
|
|
204
|
+
const sourceCandidateSignature = gulpSourceCandidateGetter ? `gulp-source-candidates:1:${[...gulpSourceCandidateGetter(void 0)].sort().join("\n")}` : void 0;
|
|
205
|
+
const styleOutputExtension = resolveGulpStyleOutputExtension(file);
|
|
206
|
+
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, rawSource, options);
|
|
207
|
+
const outputFile = (file.relative || path.basename(file.path)).replaceAll(path.sep, "/");
|
|
208
|
+
const compilationScope = {
|
|
209
|
+
id: outputFile,
|
|
210
|
+
kind: cssHandlerOptions.isMainChunk ? "global" : "component"
|
|
211
|
+
};
|
|
212
|
+
rememberCompilationScope(file.path, compilationScope.id);
|
|
213
|
+
const compilationDependencyRevision = getCompilationDependencyRevision(compilationScope.id);
|
|
214
|
+
const outputSignature = `${styleOutputExtension ? `gulp-output:1:${stage}:${styleOutputExtension}` : `gulp-output:0:${stage}`}:compiler-dependencies:${compilationDependencyRevision}`;
|
|
215
|
+
await processCachedTask({
|
|
216
|
+
cache,
|
|
217
|
+
cacheKey: file.path,
|
|
218
|
+
hash: createRuntimeSetHash(rawSource, nextRuntimeSet, sourceTraceSignature, sourceCandidateSignature, outputSignature),
|
|
219
|
+
applyResult(source) {
|
|
220
|
+
writeGulpFileAsset(file, source);
|
|
221
|
+
},
|
|
222
|
+
onCacheHit() {
|
|
223
|
+
debug("css cache hit: %s", file.path);
|
|
224
|
+
},
|
|
225
|
+
async transform() {
|
|
226
|
+
await runtimeState.readyPromise;
|
|
227
|
+
const generated = shouldUseGenerator ? await generateTailwindV4Css({
|
|
228
|
+
opts,
|
|
229
|
+
runtimeState,
|
|
230
|
+
runtime: nextRuntimeSet,
|
|
231
|
+
rawSource,
|
|
232
|
+
file: file.path,
|
|
233
|
+
outputFile,
|
|
234
|
+
scope: compilationScope,
|
|
235
|
+
cssHandlerOptions,
|
|
236
|
+
cssUserHandlerOptions: resolveWxssUserHandlerOptions(options),
|
|
237
|
+
getSourceCandidatesForEntries: gulpSourceCandidateGetter,
|
|
238
|
+
styleHandler,
|
|
239
|
+
debug,
|
|
240
|
+
deferCssAdaptation: stage === "generate"
|
|
241
|
+
}) : void 0;
|
|
242
|
+
const transformedCss = generated?.css ?? (stage === "generate" ? rawSource : (await styleHandler(rawSource, cssHandlerOptions)).css);
|
|
243
|
+
if (stage === "generate") {
|
|
244
|
+
const preflightMode = generated?.metadata?.preflightMode;
|
|
245
|
+
if (preflightMode) generatedCssPreflightModeByFile.set(file.path, preflightMode);
|
|
246
|
+
else generatedCssPreflightModeByFile.delete(file.path);
|
|
247
|
+
}
|
|
248
|
+
const css = annotateCssSourceTrace(transformedCss, {
|
|
249
|
+
opts,
|
|
250
|
+
tokenSources: sourceTraceTokenSources
|
|
251
|
+
});
|
|
252
|
+
const generatedCss = stage === "generate" && generated ? `${createBundlerGeneratedCssMarker("gulp", file.path)}\n${css}` : css;
|
|
253
|
+
const outputCss = stage === "generate" ? generatedCss : rewriteLocalCssImportRequestsForOutput(generatedCss, { styleOutputExtension });
|
|
254
|
+
debug("css handle: %s", file.path);
|
|
255
|
+
return { result: outputCss };
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
rememberGulpProcessCacheKey(gulpProcessCacheKeys, file.path);
|
|
259
|
+
pruneGulpProcessCache(cache, gulpProcessCacheKeys);
|
|
260
|
+
}, () => resolveGulpTransformTimingDetails(`css:${stage}`));
|
|
261
|
+
}
|
|
262
|
+
const generateWxss = (options = {}) => createWxssTransform(options, "generate");
|
|
263
|
+
const transformWxss = (options = {}) => createWxssTransform(options, "transform");
|
|
264
|
+
const adaptWxss = (options = {}) => createVinylTransform("css:adapt", async (file) => {
|
|
265
|
+
if (!file.contents) return;
|
|
266
|
+
const rawSource = file.contents.toString();
|
|
267
|
+
const generatedCss = hasBundlerGeneratedCssMarker(rawSource);
|
|
268
|
+
const source = generatedCss ? stripBundlerGeneratedCssMarkers(rawSource) : rawSource;
|
|
269
|
+
const styleOutputExtension = resolveGulpStyleOutputExtension(file);
|
|
270
|
+
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, source, options);
|
|
271
|
+
const handled = await styleHandler(source, cssHandlerOptions);
|
|
272
|
+
const preflightMode = generatedCssPreflightModeByFile.get(file.path);
|
|
273
|
+
writeGulpFileAsset(file, rewriteLocalCssImportRequestsForOutput(generatedCss ? finalizeMiniProgramGeneratorCss(handled.css, "weapp", runtimeState.tailwindRuntime.majorVersion, opts.cssPreflight, {
|
|
274
|
+
injectPreflight: preflightMode?.inject ?? cssHandlerOptions.isMainChunk,
|
|
275
|
+
preservePreflight: preflightMode?.preserve ?? cssHandlerOptions.isMainChunk,
|
|
276
|
+
styleOptions: cssHandlerOptions
|
|
277
|
+
}) : handled.css, { styleOutputExtension }));
|
|
278
|
+
debug("css adapt: %s", file.path);
|
|
279
|
+
}, () => resolveGulpTransformTimingDetails("css:adapt"));
|
|
280
|
+
const transformJs = (options = {}) => createVinylTransform("js", async (file) => {
|
|
281
|
+
if (!file.contents) return;
|
|
282
|
+
const filename = path.resolve(file.path);
|
|
283
|
+
const rawSource = file.contents.toString();
|
|
284
|
+
await refreshRuntimeSetForSource(file, rawSource, "js");
|
|
285
|
+
await runtimeState.readyPromise;
|
|
286
|
+
const moduleGraph = resolveModuleGraphOptions(options.moduleGraph);
|
|
287
|
+
const handlerOptions = {
|
|
288
|
+
...options,
|
|
289
|
+
generateMap: false,
|
|
290
|
+
filename,
|
|
291
|
+
moduleGraph,
|
|
292
|
+
babelParserOptions: {
|
|
293
|
+
...options?.babelParserOptions ?? {},
|
|
294
|
+
sourceFilename: filename
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
if (runtimeState.tailwindRuntime.majorVersion !== void 0) handlerOptions.tailwindcssMajorVersion = runtimeState.tailwindRuntime.majorVersion;
|
|
298
|
+
await processCachedTask({
|
|
299
|
+
cache,
|
|
300
|
+
cacheKey: file.path,
|
|
301
|
+
rawSource,
|
|
302
|
+
applyResult(source) {
|
|
303
|
+
writeGulpFileAsset(file, source);
|
|
304
|
+
},
|
|
305
|
+
onCacheHit() {
|
|
306
|
+
debug("js cache hit: %s", file.path);
|
|
307
|
+
},
|
|
308
|
+
async transform() {
|
|
309
|
+
await runtimeState.readyPromise;
|
|
310
|
+
const currentSource = file.contents?.toString() ?? rawSource;
|
|
311
|
+
if (shouldSkipJsTransform(currentSource, {
|
|
312
|
+
...handlerOptions,
|
|
313
|
+
classNameSet: getRuntimeSet()
|
|
314
|
+
})) return { result: currentSource };
|
|
315
|
+
const { code } = await jsHandler(currentSource, getRuntimeSet(), handlerOptions);
|
|
316
|
+
debug("js handle: %s", file.path);
|
|
317
|
+
return { result: code };
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
rememberGulpProcessCacheKey(gulpProcessCacheKeys, file.path);
|
|
321
|
+
pruneGulpProcessCache(cache, gulpProcessCacheKeys);
|
|
322
|
+
}, () => resolveGulpTransformTimingDetails("js"));
|
|
323
|
+
const transformWxml = (options = {}) => createVinylTransform("html", async (file) => {
|
|
324
|
+
if (!file.contents) return;
|
|
325
|
+
const rawSource = file.contents.toString();
|
|
326
|
+
await refreshRuntimeSetForSource(file, rawSource, "html");
|
|
327
|
+
await runtimeState.readyPromise;
|
|
328
|
+
await processCachedTask({
|
|
329
|
+
cache,
|
|
330
|
+
cacheKey: file.path,
|
|
331
|
+
rawSource,
|
|
332
|
+
applyResult(source) {
|
|
333
|
+
writeGulpFileAsset(file, source);
|
|
334
|
+
},
|
|
335
|
+
onCacheHit() {
|
|
336
|
+
debug("html cache hit: %s", file.path);
|
|
337
|
+
},
|
|
338
|
+
async transform() {
|
|
339
|
+
await runtimeState.readyPromise;
|
|
340
|
+
const code = await templateHandler(rawSource, resolveWxmlHandlerOptions(options));
|
|
341
|
+
debug("html handle: %s", file.path);
|
|
342
|
+
return { result: code };
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
rememberGulpProcessCacheKey(gulpProcessCacheKeys, file.path);
|
|
346
|
+
pruneGulpProcessCache(cache, gulpProcessCacheKeys);
|
|
347
|
+
}, () => resolveGulpTransformTimingDetails("html"));
|
|
348
|
+
return {
|
|
349
|
+
adaptWxss,
|
|
350
|
+
generateWxss,
|
|
351
|
+
transformWxss,
|
|
352
|
+
transformWxml,
|
|
353
|
+
transformJs
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region src/bundlers/gulp/shared/create-native-framework-plugins.ts
|
|
358
|
+
const debug = createDebug();
|
|
359
|
+
const GULP_COMPILATION_SCOPE_CACHE_MAX = 512;
|
|
189
360
|
/**
|
|
190
361
|
* @name weapp-tw-gulp
|
|
191
362
|
* @description native framework 的插件组合实现
|
|
@@ -197,7 +368,7 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
197
368
|
...options,
|
|
198
369
|
__internalDeferMissingCssEntriesWarning: true
|
|
199
370
|
});
|
|
200
|
-
const {
|
|
371
|
+
const { cache } = opts;
|
|
201
372
|
const initialTailwindRuntime = opts.tailwindRuntime;
|
|
202
373
|
const refreshTailwindcssRuntime = opts.refreshTailwindcssRuntime;
|
|
203
374
|
const readyPromise = createTailwindRuntimeReadyPromise(initialTailwindRuntime);
|
|
@@ -215,12 +386,13 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
215
386
|
let cachedGulpSourceCandidateSourceGetter;
|
|
216
387
|
let runtimeSetInitialized = false;
|
|
217
388
|
let runtimeSetDirty = false;
|
|
218
|
-
const runtimeSourceHashByFile = /* @__PURE__ */ new Map();
|
|
219
389
|
const runtimeSourcesByFile = /* @__PURE__ */ new Map();
|
|
390
|
+
const runtimeSnapshotState = createRuntimeCompilationBuildState();
|
|
220
391
|
const generatedCssPreflightModeByFile = /* @__PURE__ */ new Map();
|
|
392
|
+
const compilationScopeBySourceFile = /* @__PURE__ */ new Map();
|
|
221
393
|
let cachedGulpSourceCandidateSignature;
|
|
222
394
|
const gulpProcessCacheKeys = /* @__PURE__ */ new Set();
|
|
223
|
-
const bundleRuntimeClassSetManager = options.__internalGulpRuntimeClassSetManager ??
|
|
395
|
+
const bundleRuntimeClassSetManager = options.__internalGulpRuntimeClassSetManager ?? createRuntimeClassSetManager();
|
|
224
396
|
function invalidateGulpSourceCandidates() {
|
|
225
397
|
cachedGulpSourceCandidateSignature = void 0;
|
|
226
398
|
cachedGulpSourceCandidateGetter = void 0;
|
|
@@ -248,19 +420,18 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
248
420
|
}
|
|
249
421
|
async function refreshRuntimeSetForSource(file, rawSource, type) {
|
|
250
422
|
const filename = path.resolve(file.path);
|
|
251
|
-
const hash = cache.computeHash(rawSource);
|
|
252
|
-
const changed = runtimeSourceHashByFile.get(filename) !== hash;
|
|
253
|
-
runtimeSourceHashByFile.delete(filename);
|
|
254
|
-
runtimeSourceHashByFile.set(filename, hash);
|
|
255
423
|
touchMapEntry(runtimeSourcesByFile, filename, {
|
|
256
424
|
source: rawSource,
|
|
257
425
|
type
|
|
258
426
|
});
|
|
259
|
-
|
|
427
|
+
removeRuntimeCompilationBuildStateFiles(runtimeSnapshotState, pruneGulpRuntimeSourceCaches(runtimeSourcesByFile));
|
|
428
|
+
const snapshot = createGulpRuntimeSnapshot(runtimeSourcesByFile, runtimeSnapshotState, (source) => cache.computeHash(source));
|
|
429
|
+
const changed = snapshot.changedByType[type].has(filename);
|
|
430
|
+
updateRuntimeCompilationBuildState(runtimeSnapshotState, snapshot, /* @__PURE__ */ new Map());
|
|
260
431
|
if (changed) invalidateGulpSourceCandidates();
|
|
261
432
|
if (!changed && runtimeSetInitialized) return runtimeSet;
|
|
262
433
|
if (!runtimeSetDirty) try {
|
|
263
|
-
runtimeSet = await bundleRuntimeClassSetManager.sync(runtimeState.tailwindRuntime,
|
|
434
|
+
runtimeSet = await bundleRuntimeClassSetManager.sync(runtimeState.tailwindRuntime, snapshot);
|
|
264
435
|
runtimeSetInitialized = true;
|
|
265
436
|
return runtimeSet;
|
|
266
437
|
} catch (error) {
|
|
@@ -271,7 +442,7 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
271
442
|
}
|
|
272
443
|
async function refreshGulpV4SourceCandidates(forceRefresh = false) {
|
|
273
444
|
const root = opts.tailwindcssBasedir ?? process.cwd();
|
|
274
|
-
const sourceScan = await
|
|
445
|
+
const sourceScan = await resolveSourceScanEntries(opts, runtimeState.tailwindRuntime, { root });
|
|
275
446
|
const nextSignature = cache.computeHash(JSON.stringify({
|
|
276
447
|
root,
|
|
277
448
|
entries: sourceScan?.entries,
|
|
@@ -411,167 +582,78 @@ function createNativeGulpPlugins(options = {}) {
|
|
|
411
582
|
gulpProcessCacheKeys,
|
|
412
583
|
phase,
|
|
413
584
|
runtimeSet,
|
|
414
|
-
runtimeSourceHashByFile,
|
|
585
|
+
runtimeSourceHashByFile: runtimeSnapshotState.sourceHashByFile,
|
|
415
586
|
runtimeSourcesByFile
|
|
416
587
|
}) };
|
|
417
588
|
}
|
|
418
|
-
function
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
if (shouldUseGenerator) gulpSourceCandidateGetter = await refreshGulpV4SourceCandidates(cssSourceChanged);
|
|
426
|
-
const nextRuntimeSet = await refreshRuntimeSet({
|
|
427
|
-
forceRefresh: cssSourceChanged,
|
|
428
|
-
forceCollect: cssSourceChanged,
|
|
429
|
-
clearCache: cssSourceChanged
|
|
430
|
-
});
|
|
431
|
-
const sourceTraceTokenSources = cachedGulpSourceCandidateSourceGetter ? createCssTokenSourceMap(cachedGulpSourceCandidateSourceGetter(void 0), opts) : void 0;
|
|
432
|
-
const sourceTraceSignature = createCssSourceTraceCacheSignature(sourceTraceTokenSources, opts);
|
|
433
|
-
const sourceCandidateSignature = cachedGulpSourceCandidateGetter ? `gulp-source-candidates:1:${[...cachedGulpSourceCandidateGetter(void 0)].sort().join("\n")}` : void 0;
|
|
434
|
-
const styleOutputExtension = resolveGulpStyleOutputExtension(file);
|
|
435
|
-
const outputSignature = styleOutputExtension ? `gulp-output:1:${stage}:${styleOutputExtension}` : `gulp-output:0:${stage}`;
|
|
436
|
-
await processCachedTask({
|
|
437
|
-
cache,
|
|
438
|
-
cacheKey: file.path,
|
|
439
|
-
hash: createRuntimeSetHash(rawSource, nextRuntimeSet, sourceTraceSignature, sourceCandidateSignature, outputSignature),
|
|
440
|
-
applyResult(source) {
|
|
441
|
-
file.contents = Buffer.from(source);
|
|
442
|
-
},
|
|
443
|
-
onCacheHit() {
|
|
444
|
-
debug("css cache hit: %s", file.path);
|
|
445
|
-
},
|
|
446
|
-
async transform() {
|
|
447
|
-
await runtimeState.readyPromise;
|
|
448
|
-
const cssHandlerOptions = resolveWxssFileHandlerOptions(file, rawSource, options);
|
|
449
|
-
const generated = shouldUseGenerator ? await generateCssByGenerator({
|
|
450
|
-
opts,
|
|
451
|
-
runtimeState,
|
|
452
|
-
runtime: nextRuntimeSet,
|
|
453
|
-
rawSource,
|
|
454
|
-
file: file.path,
|
|
455
|
-
cssHandlerOptions,
|
|
456
|
-
cssUserHandlerOptions: resolveWxssUserHandlerOptions(options),
|
|
457
|
-
getSourceCandidatesForEntries: gulpSourceCandidateGetter,
|
|
458
|
-
styleHandler,
|
|
459
|
-
debug,
|
|
460
|
-
deferCssAdaptation: stage === "generate"
|
|
461
|
-
}) : void 0;
|
|
462
|
-
const transformedCss = generated?.css ?? (stage === "generate" ? rawSource : (await styleHandler(rawSource, cssHandlerOptions)).css);
|
|
463
|
-
if (stage === "generate") {
|
|
464
|
-
const preflightMode = generated?.metadata?.preflightMode;
|
|
465
|
-
if (preflightMode) generatedCssPreflightModeByFile.set(file.path, preflightMode);
|
|
466
|
-
else generatedCssPreflightModeByFile.delete(file.path);
|
|
467
|
-
}
|
|
468
|
-
const css = annotateCssSourceTrace(transformedCss, {
|
|
469
|
-
opts,
|
|
470
|
-
tokenSources: sourceTraceTokenSources
|
|
471
|
-
});
|
|
472
|
-
const generatedCss = stage === "generate" && generated ? `${createBundlerGeneratedCssMarker("gulp", file.path)}\n${css}` : css;
|
|
473
|
-
const outputCss = stage === "generate" ? generatedCss : rewriteLocalCssImportRequestsForOutput(generatedCss, { styleOutputExtension });
|
|
474
|
-
debug("css handle: %s", file.path);
|
|
475
|
-
return { result: outputCss };
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
rememberGulpProcessCacheKey(gulpProcessCacheKeys, file.path);
|
|
479
|
-
pruneGulpProcessCache(cache, gulpProcessCacheKeys);
|
|
480
|
-
}, () => resolveGulpTransformTimingDetails(`css:${stage}`));
|
|
589
|
+
function rememberCompilationScope(sourceFile, scopeId) {
|
|
590
|
+
touchMapEntry(compilationScopeBySourceFile, path.resolve(sourceFile), scopeId);
|
|
591
|
+
while (compilationScopeBySourceFile.size > GULP_COMPILATION_SCOPE_CACHE_MAX) {
|
|
592
|
+
const oldestSourceFile = compilationScopeBySourceFile.keys().next().value;
|
|
593
|
+
if (typeof oldestSourceFile !== "string") break;
|
|
594
|
+
compilationScopeBySourceFile.delete(oldestSourceFile);
|
|
595
|
+
}
|
|
481
596
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
preservePreflight: preflightMode?.preserve ?? cssHandlerOptions.isMainChunk,
|
|
496
|
-
styleOptions: cssHandlerOptions
|
|
497
|
-
}) : handled.css;
|
|
498
|
-
file.contents = Buffer.from(rewriteLocalCssImportRequestsForOutput(finalized, { styleOutputExtension }));
|
|
499
|
-
debug("css adapt: %s", file.path);
|
|
500
|
-
}, () => resolveGulpTransformTimingDetails("css:adapt"));
|
|
501
|
-
const transformJs = (options = {}) => createVinylTransform("js", async (file) => {
|
|
502
|
-
if (!file.contents) return;
|
|
503
|
-
const filename = path.resolve(file.path);
|
|
504
|
-
const rawSource = file.contents.toString();
|
|
505
|
-
await refreshRuntimeSetForSource(file, rawSource, "js");
|
|
506
|
-
await runtimeState.readyPromise;
|
|
507
|
-
const moduleGraph = resolveModuleGraphOptions(options.moduleGraph);
|
|
508
|
-
const handlerOptions = {
|
|
509
|
-
...options,
|
|
510
|
-
generateMap: false,
|
|
511
|
-
filename,
|
|
512
|
-
moduleGraph,
|
|
513
|
-
babelParserOptions: {
|
|
514
|
-
...options?.babelParserOptions ?? {},
|
|
515
|
-
sourceFilename: filename
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
if (runtimeState.tailwindRuntime.majorVersion !== void 0) handlerOptions.tailwindcssMajorVersion = runtimeState.tailwindRuntime.majorVersion;
|
|
519
|
-
await processCachedTask({
|
|
520
|
-
cache,
|
|
521
|
-
cacheKey: file.path,
|
|
522
|
-
rawSource,
|
|
523
|
-
applyResult(source) {
|
|
524
|
-
file.contents = Buffer.from(source);
|
|
525
|
-
},
|
|
526
|
-
onCacheHit() {
|
|
527
|
-
debug("js cache hit: %s", file.path);
|
|
528
|
-
},
|
|
529
|
-
async transform() {
|
|
530
|
-
await runtimeState.readyPromise;
|
|
531
|
-
const currentSource = file.contents?.toString() ?? rawSource;
|
|
532
|
-
if (shouldSkipJsTransform(currentSource, {
|
|
533
|
-
...handlerOptions,
|
|
534
|
-
classNameSet: runtimeSet
|
|
535
|
-
})) return { result: currentSource };
|
|
536
|
-
const { code } = await jsHandler(currentSource, runtimeSet, handlerOptions);
|
|
537
|
-
debug("js handle: %s", file.path);
|
|
538
|
-
return { result: code };
|
|
597
|
+
/** 记录 Gulp watcher 提交的源码或生成依赖变化。 */
|
|
598
|
+
async function watchChange(id, change = { event: "update" }) {
|
|
599
|
+
beginCompilerShadowRun(runtimeState);
|
|
600
|
+
const file = path.resolve(id);
|
|
601
|
+
const affectedScopes = recordCompilationDependencyChanges(runtimeState, createCompilationDependencyChanges([file]));
|
|
602
|
+
invalidateGulpSourceCandidates();
|
|
603
|
+
if (change.event === "delete") {
|
|
604
|
+
const removedRuntimeSource = runtimeSourcesByFile.delete(file);
|
|
605
|
+
const removedCssSource = removeTailwindV4CssSource(opts, file);
|
|
606
|
+
const removedScopeId = compilationScopeBySourceFile.get(file);
|
|
607
|
+
if (removedScopeId) {
|
|
608
|
+
invalidateCompilationScope(runtimeState, removedScopeId);
|
|
609
|
+
compilationScopeBySourceFile.delete(file);
|
|
539
610
|
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
await processCachedTask({
|
|
550
|
-
cache,
|
|
551
|
-
cacheKey: file.path,
|
|
552
|
-
rawSource,
|
|
553
|
-
applyResult(source) {
|
|
554
|
-
file.contents = Buffer.from(source);
|
|
555
|
-
},
|
|
556
|
-
onCacheHit() {
|
|
557
|
-
debug("html cache hit: %s", file.path);
|
|
558
|
-
},
|
|
559
|
-
async transform() {
|
|
560
|
-
await runtimeState.readyPromise;
|
|
561
|
-
const code = await templateHandler(rawSource, resolveWxmlHandlerOptions(options));
|
|
562
|
-
debug("html handle: %s", file.path);
|
|
563
|
-
return { result: code };
|
|
611
|
+
removeRuntimeCompilationBuildStateFiles(runtimeSnapshotState, [file]);
|
|
612
|
+
generatedCssPreflightModeByFile.delete(file);
|
|
613
|
+
gulpProcessCacheKeys.delete(file);
|
|
614
|
+
cache.instance.delete(file);
|
|
615
|
+
cache.hashMap.delete(file);
|
|
616
|
+
if (removedRuntimeSource || removedCssSource) {
|
|
617
|
+
runtimeSetInitialized = false;
|
|
618
|
+
runtimeSetDirty = true;
|
|
619
|
+
await bundleRuntimeClassSetManager.reset();
|
|
564
620
|
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}, () => resolveGulpTransformTimingDetails("html"));
|
|
621
|
+
}
|
|
622
|
+
return affectedScopes;
|
|
623
|
+
}
|
|
569
624
|
return {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
625
|
+
...createGulpFileTransforms({
|
|
626
|
+
cache,
|
|
627
|
+
createRuntimeSetHash,
|
|
628
|
+
debug,
|
|
629
|
+
generatedCssPreflightModeByFile,
|
|
630
|
+
getCompilationDependencyRevision: (scopeId) => getCompilationScopeDependencyRevision(runtimeState, scopeId),
|
|
631
|
+
getSourceCandidateGetter: () => cachedGulpSourceCandidateGetter,
|
|
632
|
+
getSourceCandidateSourceGetter: () => cachedGulpSourceCandidateSourceGetter,
|
|
633
|
+
getRuntimeSet: () => runtimeSet,
|
|
634
|
+
gulpProcessCacheKeys,
|
|
635
|
+
opts,
|
|
636
|
+
refreshGulpV4SourceCandidates,
|
|
637
|
+
refreshRuntimeSet,
|
|
638
|
+
refreshRuntimeSetForSource,
|
|
639
|
+
registerAutoCssSource,
|
|
640
|
+
rememberCompilationScope,
|
|
641
|
+
resolveGulpStyleOutputExtension,
|
|
642
|
+
resolveGulpTransformTimingDetails,
|
|
643
|
+
resolveModuleGraphOptions,
|
|
644
|
+
resolveWxmlHandlerOptions,
|
|
645
|
+
resolveWxssFileHandlerOptions,
|
|
646
|
+
resolveWxssUserHandlerOptions,
|
|
647
|
+
runtimeState
|
|
648
|
+
}),
|
|
649
|
+
beginCompilerShadowRun: () => beginCompilerShadowRun(runtimeState),
|
|
650
|
+
completeCompilerShadowRun: (revision) => finalizeCompilerShadowRun(runtimeState, { revision }),
|
|
651
|
+
async dispose() {
|
|
652
|
+
await disposeCompilerOwner(runtimeState);
|
|
653
|
+
await bundleRuntimeClassSetManager.reset();
|
|
654
|
+
},
|
|
655
|
+
getCompilerShadowRunSnapshot: () => getCompilerShadowRunSnapshot(runtimeState),
|
|
656
|
+
watchChange
|
|
575
657
|
};
|
|
576
658
|
}
|
|
577
659
|
//#endregion
|
package/dist/gulp.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_gulp = require("./gulp-Cjcss8T_.cjs");
|
|
3
|
+
exports.WeappTailwindcss = require_gulp.createPlugins;
|
|
4
|
+
exports.createPlugins = require_gulp.createPlugins;
|
|
5
|
+
exports.weappTailwindcss = require_gulp.createPlugins;
|
package/dist/gulp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './bundlers/gulp/index';
|
|
2
|
-
export { createPlugins as WeappTailwindcss } from './bundlers/gulp/index';
|
|
3
|
-
export { createPlugins as weappTailwindcss } from './bundlers/gulp/index';
|
|
4
|
-
export type { UserDefinedOptions } from './types';
|
|
1
|
+
export * from './bundlers/gulp/index.js';
|
|
2
|
+
export { createPlugins as WeappTailwindcss } from './bundlers/gulp/index.js';
|
|
3
|
+
export { createPlugins as weappTailwindcss } from './bundlers/gulp/index.js';
|
|
4
|
+
export type { UserDefinedOptions } from './types/index.js';
|
package/dist/gulp.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.WeappTailwindcss = require_gulp.createPlugins;
|
|
4
|
-
exports.createPlugins = require_gulp.createPlugins;
|
|
5
|
-
exports.weappTailwindcss = require_gulp.createPlugins;
|
|
1
|
+
import { t as createPlugins } from "./gulp-DNXQvDUw.js";
|
|
2
|
+
export { createPlugins as WeappTailwindcss, createPlugins, createPlugins as weappTailwindcss };
|