First of all, compiling of statics shouldn't be a required step. No one does this during development. 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.
The npm install step is mostly one-time.
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? :)

P.

On 12/15/2014 11:35 AM, Anton Zemlyanov wrote:
My experience with building Fuel plugins with UI part is following. To build a ui-less plugin, it takes 3 seconds and those commands:

git clone https://github.com/AlgoTrader/test-plugin.git
cd ./test-plugin
fpb --build ./

When UI added, build start to look like this and takes many minutes:

git clone https://github.com/AlgoTrader/test-plugin.git
git clone https://github.com/stackforge/fuel-web.git
cd ./fuel-web
git fetch https://review.openstack.org/stackforge/fuel-web refs/changes/00/112600/24 && git checkout FETCH_HEAD
cd ..
mkdir -p ./fuel-web/nailgun/static/plugins/test-plugin
cp -R ./test-plugin/ui/* ./fuel-web/nailgun/static/plugins/test-plugin
cd ./fuel-web/nailgun
npm install && npm update
grunt build --static-dir=static_compressed
cd ../..
rm -rf ./test-plugin/ui
mkdir ./test-plugin/ui
cp -R ./fuel-web/nailgun/static_compressed/plugins/test-plugin/* ./test-plugin/ui
cd ./test-plugin
fpb --build ./

I think we need something not so complex and fragile

Anton




_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to