Skip to content

Commit 2495f53

Browse files
authored
Remove code stripping documentation (#86)
Google Closure compiler has deprecated code stripping and made the APIs non-public. In fact, shadow-cljs has been ignoring the keys documented in the "Code Stripping" section. Hence remove the documentation.
1 parent f65d018 commit 2495f53

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

docs/release.adoc

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -174,34 +174,6 @@ global:SomeGlobalVariable
174174

175175
In this example the compiler will stop renaming `something.foo()`, `something.bar()`.
176176

177-
== Code Stripping
178-
179-
The Closure Compiler supports removing unwanted code by name. This allows removing code that normal dead-code removal can't or won't remove. This is quite dangerous as it can remove code you actually care about but it can remove a lot of dev only code easily. It is grouped into 4 separate options of which pretty much only `:strip-type-prefixes` is relevant to ClojureScript but other may be useful as well.
180-
181-
.Example removing all uses of `cljs.pprint`
182-
```
183-
{...
184-
:builds
185-
{:app
186-
{:target :browser
187-
...
188-
:compiler-options {:strip-type-prefixes #{"cljs.pprint"}
189-
}}}
190-
```
191-
192-
Each of these options is specified as a Set of Strings. Please note that all the names specified here are JS names so certain CLJS names must be munged. `my-lib.core` becomes `my_lib.core`.
193-
194-
[Horizontal]
195-
`:strip-types`:: Allows removing deftype/defrecord declarations or uses. `#{"my.ns.FooBar}` removes `(defrecord FooBar [])`.
196-
`:strip-type-prefixes`:: Removes everything starting with any of the given Prefixes. Allows removing entire CLJS namespaces.
197-
`:strip-name-prefixes`:: Allows removing properties by prefix. `#{"log"}` removes `this.logX` or `(defn log-me [...])`
198-
`:strip-name-suffixes`:: Allows removing properties by suffix. `#{"log"}` removes `this.myLog` or `(defn my-log [...])`
199-
200-
****
201-
*DANGER: Be careful with these options. They apply to your entire build and may remove code you actually need. You may accidentally remove code in libraries not written by you. Always consider other options before using this.*
202-
****
203-
204-
205177
== Build Report [[build-report]]
206178

207179
`shadow-cljs` can generate a detailed report for your `release` builds which includes a detailed breakdown of the included sources and how much they each contributed to the overall size.

0 commit comments

Comments
 (0)