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

chore: generator v7 #10

Merged
merged 2 commits into from Sep 28, 2018
Merged

chore: generator v7 #10

merged 2 commits into from Sep 28, 2018

Conversation

brandonocasey
Copy link
Contributor

@brandonocasey brandonocasey commented Sep 11, 2018

Changes

  • See the code comments

Copyright Brightcove Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The long version of this license used to be in the repo, but all of our other projects use the short one. I think it makes sense to switch here.

@@ -12,12 +12,14 @@ if (userArgs.indexOf('-h') !== -1 || userArgs.indexOf('--help') !== -1) {
// eslint-disable-next-line
console.log('usage: pkcs7');
// eslint-disable-next-line
return console.log('pkcs7 expects input on stdin and outputs to stdout');
console.log('pkcs7 expects input on stdin and outputs to stdout');
process.exit();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The linter complained about using return here, I think process.exit makes more sense. Same for the code below this.

}]
});

if (config.builds.browserMin) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These previously did not exist, but I think they probably should.

@@ -0,0 +1,62 @@
/* eslint-disable object-shorthand */

import {pad, unpad} from '../src/pkcs7.js';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole file was moved to follow the standard test naming format and converted to QUnit I think that its small enough to see that everything is still the same though.

"watch:test": "rollup -c scripts/test.rollup.js -w",
"prepublish": "npm run build"
"watch:js": "npm run build:js -- -w",
"watch:test": "npm run test:node -- -w",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This watches the tests and re-runs them when test/dist/bundle.js changes, I could see removing this or keeping it in. It mostly to have parity when npm run start is used so that we get test feedback on changes.

"pretest": "npm-run-all lint build",
"test": "npm-run-all -p test:browser test:node",
"test:browser": "karma start scripts/karma.conf.js",
"test:node": "qunit test/dist/bundle.js",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously tests only ran on node with nodeunit but qunit can now run its tests in node. So after switching the tests to QUnit we run them in both places. Super cool.

@brandonocasey brandonocasey merged commit e075fe6 into master Sep 28, 2018
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.

None yet

2 participants