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

Enable browserify build process #240

Merged
merged 2 commits into from
Oct 30, 2017
Merged

Enable browserify build process #240

merged 2 commits into from
Oct 30, 2017

Conversation

bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Oct 23, 2017

We need to get yo-yoify into the build process before we release. @blahah released a nice transform that makes this work nicely in electron by prefixing require calls to built in to be window.require so that electron and other built in node calls still 'just work'.

  • npm start: runs hyperamp in dev mode. Uses buds for building a bundle without making a mess on disk.
  • npm run build: builds hyperamp without any additional optimizations. Does not create DMG
  • npm run prod: builds hyperamp with a few optimizations and creates a DMG.

Closes #174

We need to get yo-yoify into the build process before we release.
@bcomnes bcomnes requested a review from ungoldman October 23, 2017 02:28
@bcomnes bcomnes added this to the Winamp 2 milestone Oct 23, 2017
@bcomnes bcomnes self-assigned this Oct 23, 2017
Copy link
Member

@ungoldman ungoldman left a comment

Choose a reason for hiding this comment

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

In the past I've done the following to avoid maintaining two nearly identical index.html files:

<script>
    if (process.env.NODE_ENV === 'development') {
      let bundle = document.createElement('script')
      bundle.src = 'http://localhost:8283/bundle.js'
      document.body.appendChild(bundle)
    } else {
      require('../bundle/bundle.js')
    }
  </script>

Otherwise LGTM

@ungoldman ungoldman merged commit 92ebcc4 into master Oct 30, 2017
@ungoldman ungoldman deleted the browserify branch October 30, 2017 18:52
@bcomnes
Copy link
Contributor Author

bcomnes commented Oct 30, 2017

We should do that.

@ungoldman
Copy link
Member

@bcomnes see #245

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

Successfully merging this pull request may close these issues.

Yo-yoify (or something) critical render paths
2 participants