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

Generate Index.html with webpack - Closes #514 #522

Merged
merged 18 commits into from
Mar 12, 2018

Conversation

faival
Copy link
Contributor

@faival faival commented Mar 6, 2018

What was the problem?

  • dev-ops requires to check built version deployed within the html of the application
  • bundles at the moment do not contain hash strings (cached forever)
  • automate injection of inline css on head of document

How did I fix it?

  • added meta tag in head of document displaying current package.json version:
  • bundles now append the hash used to generate them (only for production build)
  • head css has been moved to a separate file, (now it's stylelinted, and fixed)

How to test it?

  • verify head of document contains current version in package.json
    <meta data-lisk-hub-version="0.2.0-rc.1">
  • verify scripts inclusion in body contain the hash in the referenced bundle
<link rel="stylesheet" href="./styles.c99be3303f67c17c6c39.css">
<script src="./bundle.vendor.c99be3303f67c17c6c39.js"></script>
<script src="./bundle.app.c99be3303f67c17c6c39.js"></script>
  • verify there's a style tag in head containing the styles of src/assets/css/styles.head.css and those are minified
<style type="text/css">
          body{background-color:#013165}.splash-screen{
...
</style>

Review checklist

@faival faival self-assigned this Mar 6, 2018
@faival faival requested a review from slaweet March 6, 2018 09:57
@faival faival changed the title Add new dev dependency - Closes #514 Generate Index.html with webpack - Closes #514 Mar 6, 2018
slaweet
slaweet previously approved these changes Mar 12, 2018
Copy link
Contributor

@slaweet slaweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, Pablo

@faival
Copy link
Contributor Author

faival commented Mar 12, 2018

dev build goal should also inject styles in head.

@slaweet slaweet dismissed their stale review March 12, 2018 14:31

npm run dev has broken styles

@faival faival merged commit 9d67763 into 0.3.0 Mar 12, 2018
@faival faival deleted the 514-generate-index-html-with-webpack branch March 12, 2018 15:40
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

Successfully merging this pull request may close these issues.

2 participants