Skip to content
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

How to only rename js file name, but not its content? #128

Open
gembin opened this issue Jan 13, 2016 · 2 comments
Open

How to only rename js file name, but not its content? #128

gembin opened this issue Jan 13, 2016 · 2 comments

Comments

@gembin
Copy link

gembin commented Jan 13, 2016

How to only rename js file name, but not its content?
The replacement may cause some unexpected mistakes, even though i set annotator and replacer.

@gembin
Copy link
Author

gembin commented Jan 13, 2016

dontRenameFile: [/^\/favicon.ico$/g, '.html', /^\/fonts\/.*/, /^\/scripts\/.*/, '.json']

I add options, it didn't rename the js files, but in the index.html the js files are referenced by the renamed js files names. e.g.

scripts/app.js
scripts/vendor.js

BUT in the index.html:

<script src="scripts/vendor.e41a3611.js"></script>
<script src="scripts/app.7c38e5a4.js"></script>

And if the js files are in the dontRenameFile list, dose it mean its content will not be replaced by rev-all ?

And i updated the correct js file names in the index.html, the html still cannot be displayed with right css style, not sure if there are some places wrongly replaced. It seems it's quite problematic. : -(

What i want to achieve is: rename css, js, image, index.html, and update the references in the right place. And in js files there shouldn't be any references to update.

@curiousercreative
Copy link

@gembin sorry to resurrect, but I had some success with this workaround for disabling file contents replacements: #97 (comment)

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

No branches or pull requests

2 participants