View Source PhoenixAssetPipeline.Obfuscator (phoenix_asset_pipeline v1.0.15)
Provides obfuscatation for class names.
Summary
Functions
Obfuscates the class name string by replacing with unique short name.
Obfuscates the CSS content by replacing the class names with the obfuscated class names. ""
Obfuscates the JavaScript content by replacing the obfuscate(<class_name>)
string with the obfuscated class name.
Checks if the class name is valid css class name.
Functions
Obfuscates the class name string by replacing with unique short name.
phx-
prefixed class names are not obfuscated.
Examples
"mt-1"
"mt-2"
"phx-click"
Output
"m"
"m1"
"phx-click"
Obfuscates the CSS content by replacing the class names with the obfuscated class names. ""
Examples
.mt-1 {
margin-top: 0.25rem
}
Output
.m {
margin-top: 0.25rem
}
Obfuscates the JavaScript content by replacing the obfuscate(<class_name>)
string with the obfuscated class name.
Examples
Document.getElementsByClassName("obfuscate(my-class)")
Output
Document.getElementsByClassName("m")
Checks if the class name is valid css class name.