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

refactor: Consolidate disparate Rollup configs into a single Rollup config. #155

Merged
merged 5 commits into from
Jun 7, 2018

Conversation

misteroneill
Copy link
Member

No description provided.

@misteroneill misteroneill added this to the v6.0.0 milestone Feb 4, 2018
Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

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

Code LGTM, I am just wondering if we want to pull in a few more things from the mpd-parser pr, I guess we could do them separately though.

  • Move the banner insertion and uglification into the rollup config, and get rid of the scripts
  • Get rid of the test bundle and have karma rollup for us
  • Get rid of test/index.html and link to the karma debug page

@misteroneill
Copy link
Member Author

Yeah, suppose we could do that. Sounds good.

@brandonocasey brandonocasey deleted the rollup-consolidate branch June 5, 2018 16:44
@brandonocasey brandonocasey changed the base branch from next to master June 5, 2018 16:56
@brandonocasey brandonocasey reopened this Jun 5, 2018
@brandonocasey brandonocasey force-pushed the rollup-consolidate branch 2 times, most recently from 31be781 to dda56db Compare June 5, 2018 17:02
@brandonocasey
Copy link
Contributor

  • I added the banner to a js file, so that postcss can use it when the time comes
  • I made karma do its own rollup, so that we don't have to worry about test building
  • I removed test/index.html in favor of the karma debug page. This will be improved more in Feat/karma server only #168

@@ -0,0 +1,3 @@
const pkg = require('../package.json');

module.exports = `/*! @name ${pkg.name} @version ${pkg.version} @copyright ${pkg.author} @license ${pkg.license} */`
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want this on multiple lines like before? seems like a waste of space to me, but I don't feel strongly that it has to be done on the same line.


const files = new nodeStatic.Server(process.cwd(), {cache: false});

const server = http.createServer((request, response) => {
response.setHeader('Cache-Control', 'no-cache,must-revalidate');
const requestUrl = url.parse('http://' + request.headers.host + request.url);
Copy link
Contributor

Choose a reason for hiding this comment

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

Auto redirect /test to karma server

@@ -11,7 +19,7 @@ module.exports = function(config) {

// If no browsers are specified, we enable `karma-detect-browsers`
// this will detect all browsers that are available for testing
if (!config.browsers.length) {
if (config.browsers !== false && !config.browsers.length) {
Copy link
Contributor

Choose a reason for hiding this comment

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

passing --no-browsers causes this to be false rather than an empty array, and we want to respect --no-browsers for the test:server

Copy link
Member Author

@misteroneill misteroneill left a comment

Choose a reason for hiding this comment

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

LGTM

@brandonocasey brandonocasey merged commit d3c6ba1 into master Jun 7, 2018
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.

2 participants