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

[TIMOB-25059] Use module hooks instead of plugins #254

Merged
merged 9 commits into from
Nov 9, 2017
10 changes: 9 additions & 1 deletion hooks/hyperloop-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
const fs = require('fs');
const path = require('path');

exports.id = 'com.appcelerator.hyperloop';
exports.id = 'com.appcelerator.hyperloop.init';
exports.cliVersion = '>=3.2';
exports.init = (logger, config, cli, appc) => {
cli.on('cli:check-plugins', () => {
for (const plugin of cli.tiapp.plugins) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use forEach here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm trying to use for...of whenever possible because it allows break and continue logic and doesn't overrides the context because no new function is created.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine then

if (plugin.id === 'hyperloop') {
logger.error('Legacy Hyperloop plugin detected! Please remove any references to the Hyperloop plugin tag from your tiapp.xml. Since Hyperloop 3.0 you only need to enable it as a module.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe phrase it Hyperloop "<plugin>" tag ?

process.exit(1);
}
}
});
cli.on('build.pre.compile', {
priority: 1300,
post: function (builder, callback) {
Expand Down
Binary file removed packages/hyperloop-ios-metabase/bin/metabase
Binary file not shown.