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

mgr/dashboard: Add package-lock.json #23285

Merged
merged 2 commits into from Aug 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions make-dist
Expand Up @@ -80,11 +80,12 @@ build_dashboard_frontend() {
TEMP_DIR=`mktemp -d`
$CURR_DIR/src/tools/setup-virtualenv.sh --python=$(_python_autoselect) $TEMP_DIR
$TEMP_DIR/bin/pip install nodeenv
$TEMP_DIR/bin/nodeenv -p -n 8.10.0
$TEMP_DIR/bin/nodeenv -p --node=8.11.3
cd src/pybind/mgr/dashboard/frontend
. $TEMP_DIR/bin/activate
npm install
npm run build -- --prod
npm i -g npm --unsafe-perm
npm ci
npm run build -- --prod --progress=false
deactivate
cd $CURR_DIR
rm -rf $TEMP_DIR
Expand Down
4 changes: 2 additions & 2 deletions src/pybind/mgr/dashboard/CMakeLists.txt
Expand Up @@ -34,7 +34,7 @@ add_custom_command(
OUTPUT "${mgr-dashboard-nodeenv}/bin/npm"
COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv}
COMMAND ${mgr-dashboard-nodeenv}/bin/pip install nodeenv
COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p -n 8.11.3
COMMAND ${mgr-dashboard-nodeenv}/bin/nodeenv -p --node=8.11.3
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "dashboard nodeenv is being installed"
)
Expand All @@ -45,7 +45,7 @@ add_custom_target(mgr-dashboard-nodeenv

add_npm_command(
OUTPUT "${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend/node_modules"
COMMAND npm install
COMMAND npm i -g npm@6.2.0 --unsafe-perm && npm ci
DEPENDS frontend/package.json
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend
COMMENT "dashboard frontend dependencies are being installed"
Expand Down
2 changes: 1 addition & 1 deletion src/pybind/mgr/dashboard/HACKING.rst
Expand Up @@ -16,7 +16,7 @@ Prerequisites
~~~~~~~~~~~~~

* Node 8.9.0 or higher
* NPM 5.5.1 or higher
* NPM 5.7.0 or higher

nodeenv:
During Ceph's build we create a virtualenv with ``node`` and ``npm``
Expand Down
1 change: 0 additions & 1 deletion src/pybind/mgr/dashboard/frontend/.gitignore
Expand Up @@ -44,7 +44,6 @@ Thumbs.db

# Package lock files
yarn.lock
package-lock.json

# Ceph
!core
Expand Down
1 change: 0 additions & 1 deletion src/pybind/mgr/dashboard/frontend/.npmrc

This file was deleted.