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
commands: assets update/watch/install-module/watch-module & shell & pyshell #173
Conversation
* Changes the update command to allow specifying the FLASK_ENV as well as cleaning the assets folder prior to building and installing. * Changes the parameters for the updated command. * Adds a new command to start assets watching.
To be crosschecked but if the The first time is called here: invenio-cli/invenio_cli/helpers/commands.py Line 164 in 6068cba
flask_env is production . Since it it a function inside LocalCommands , would it make sense to change default to developement ? I would assume that whoever goes through installing locally would develop...
Just a heads up in case someone tries it, I think it is:
Not |
So, I've added (setting
However, as soon as you install an existing module in dev mode (e.g. I think it makes sense to stay with
Correct, I've edited the description accordingly. |
* Adds command 'invenio-cli assets install-module' which will install, build, and link a JavaScript module. * Adds command 'invenio-cli assets watch-module' which watch changes on a JavaScript module. * Adds command 'invenio-cli shell' which will start a virtualenv shell. * Adds command 'invenio-cli pyshell' which will Python application shell.
Moves
invenio-cli update
toinvenio-cli assets update
Adds options
invenio-cli assets update --force --development
:--force
: Will clean the assets folder including node modules and install/build the webpack project.--development
: Will symlink files (by settingFLASK_ENV=development
)Adds command
invenio-cli assets watch
to watch the instance's webpack project for changes (runningpipenv run invenio webpack run start
).Adds command
invenio-cli assets install-module
which will install, build, and link a JavaScript module (using pynpm module).Adds command
invenio-cli assets watch-module
which watch changes on a JavaScript module.Adds command
invenio-cli shell
which will start a virtualenv shell.Adds command
invenio-cli pyshell
which will start a Python application shell.Adds option
invenio-cli install --pre --development
to set FLASK_ENV=developement and thereby symlink assetsAddresses #170
WIth this you can now:
Now, live happily ever after with live reloading when editing files.
Note 1
I didn't go with
invenio-cli ext js-install
as a Python module install and React module install works very differently, so I personally felt it was more appropriate to have anassets
command which operates purely on the assets.Note 2
We could likely integrate
invenio-cli assets update --force --development
intoinvenio-cli ext module-install ~/src/invenio-rdm-records
. For instance:Would run:
You could disable the rebuild of assets with :