File create_node_modules.sh of Package python-nbclassic
#!/bin/sh
#
# Script to create node_modules.tar.xz
# needs bower, webpack and webpack-cli installed
# Make sure to apply all patches before running this script
#
# quilt setup python-nbclassic.spec
# cd python-nbclassic-1.3.3-build/nbclassic-1.3.3
# quilt push -a
# bash ../../create_node_modules.sh
export PATH="node_modules/.bin:$PATH"
rm yarn.lock
yarn install
yarn run build
# Copy components
pushd nbclassic/static/components/
for i in $(find . -type d)
do
cp -rf $i ../../../node_modules
done
ls > ../../../node_modules/components.txt
popd
tar cJf node_modules.tar.xz node_modules