<div dir="ltr">The building of the UI plugin has several things I do not like<div><br><div>1) I need to extract the UI part of the plugin and copy/symlink it to fuel-web</div><div>2) I have to run grunt build on the whole fuel-web</div></div><div>3) I have to copy files back to original location to pack them</div><div>4) I cannot easily switch between development/production versions (no way to easily change entry point)</div><div><br></div><div>The only way to install plugin is `fuel plugins --install`, no matter development or production, so even development plugins should be packed to tar.gz</div><div><br></div><div>Anton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 15, 2014 at 3:30 PM, Przemyslaw Kaminski <span dir="ltr"><<a href="mailto:pkaminski@mirantis.com" target="_blank">pkaminski@mirantis.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
First of all, compiling of statics shouldn't be a required step. No
one does this during development.<br>
For production-ready plugins, the compiled files should already be
included in the GitHub repos and installation of plugin should just
be a matter of downloading it. The API should then take care of
informing the UI what plugins are installed.<br>
The npm install step is mostly one-time.<br>
The grunt build step for the plugin should basically just compile
the staticfiles of the plugin and not the whole project. Besides
with one file this is not extendable -- for N plugins we would build
2^N files with all possible combinations of including the plugins?
:)<br>
<br>
P.<div><div class="h5"><br>
<br>
<div>On 12/15/2014 11:35 AM, Anton Zemlyanov
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">My experience with building Fuel plugins with UI
part is following. To build a ui-less plugin, it takes 3 seconds
and those commands:
<div><br>
</div>
<div>
<div><font face="monospace">git clone <a href="https://github.com/AlgoTrader/test-plugin.git" target="_blank">https://github.com/AlgoTrader/test-plugin.git</a></font></div>
</div>
<div>
<div><font face="monospace">cd ./test-plugin</font></div>
<div><font face="monospace">fpb --build ./</font></div>
</div>
<div><br>
</div>
<div>When UI added, build start to look like this and takes many
minutes:</div>
<div><br>
</div>
<div>
<div><font face="monospace">git clone <a href="https://github.com/AlgoTrader/test-plugin.git" target="_blank">https://github.com/AlgoTrader/test-plugin.git</a></font></div>
<div><font face="monospace">git clone <a href="https://github.com/stackforge/fuel-web.git" target="_blank">https://github.com/stackforge/fuel-web.git</a></font></div>
<div><font face="monospace">cd ./fuel-web</font></div>
<div><font face="monospace">git fetch <a href="https://review.openstack.org/stackforge/fuel-web" target="_blank">https://review.openstack.org/stackforge/fuel-web</a>
refs/changes/00/112600/24 && git checkout
FETCH_HEAD</font></div>
<div><font face="monospace">cd ..</font></div>
<div><font face="monospace">mkdir -p
./fuel-web/nailgun/static/plugins/test-plugin</font></div>
<div><font face="monospace">cp -R ./test-plugin/ui/*
./fuel-web/nailgun/static/plugins/test-plugin</font></div>
<div><font face="monospace">cd ./fuel-web/nailgun</font></div>
<div><font face="monospace">npm install && npm update</font></div>
<div><font face="monospace">grunt build
--static-dir=static_compressed</font></div>
<div><font face="monospace">cd ../..</font></div>
<div><font face="monospace">rm -rf ./test-plugin/ui</font></div>
<div><font face="monospace">mkdir ./test-plugin/ui</font></div>
<div><font face="monospace">cp -R
./fuel-web/nailgun/static_compressed/plugins/test-plugin/*
./test-plugin/ui</font></div>
<div><font face="monospace">cd ./test-plugin</font></div>
<div><font face="monospace">fpb --build ./</font></div>
</div>
<div><font face="monospace"><br>
</font></div>
<div>I think we need something not so complex and fragile<br>
</div>
<div><br>
</div>
<div>Anton</div>
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace"><br>
</font></div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
OpenStack-dev mailing list
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div></div>