Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

fix(index-async): fix inlining of angular-loader into index-async.html #343

Closed
wants to merge 2 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Jun 17, 2016

Previously, angular-loader was never inlined into index-async.html, because running sed with a multiline RegExp fails to match anything, since sed matches per line. Using the fs module directly, solves the issues.
(Now, we no longer depend on shelljs.)

Closes #309

Also, when using '...'.replace(regex, replacement), any instances of $$ inside replacement will be
converted to $ (see mdn.
Thus, for example $$minErr and $$moduleName are converted to $minErr and $moduleName.
The 2nd commit fixes it, by first converting $$ to $$$$.

Fixes #283
Closes #286

…html`

Previously, `angular-loader` was never inlined into `index-async.html`, because running `sed` with a
multiline RegExp fails to match anything, since `sed` matches per line. Using the `fs` module
directly, solves the issues.
(Now, we no longer depend on `shelljs`.)

Closes angular#309
@gkalpak gkalpak force-pushed the fix-index-async branch 2 times, most recently from d7083e8 to 4fc738b Compare June 17, 2016 10:31
When using `'...'.replace(regex, replacement)`, any instances of `$$` inside `replacement` will be
converted to `$` (see
[mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter).
Thus, for example `$$minErr` and `$$moduleName` are converted to `$minErr` and `$moduleName`.
This commit fixes it, by first using `'...'.split(regex).join(replacement)` instead.

Fixes angular#283
Closes angular#286
petebacondarwin referenced this pull request Jun 17, 2016
When using `'...'.replace(regex, replacement)`, any instances of `$$` inside `replacement` will be
converted to `$` (see
[mdn](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter).
Thus, for example `$$minErr` and `$$moduleName` are converted to `$minErr` and `$moduleName`.
This commit fixes it, by first using `'...'.split(regex).join(replacement)` instead.

Fixes #283
Closes #286
@petebacondarwin
Copy link
Contributor

Closed via a223b77

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

function angular.$$minErr is trimmed to $minErr when run update-index-async
2 participants