support other SQLite wrappers, and various hooks needed by grist-static (#516)

This commit is contained in:
Paul Fitzpatrick
2023-05-23 15:17:28 -04:00
committed by GitHub
parent bd474a382f
commit 7be0ee289d
42 changed files with 684 additions and 249 deletions

3
sandbox/MANIFEST.in Normal file
View File

@@ -0,0 +1,3 @@
# see bundle_as_wheel.sh
include grist/tzdata.data

17
sandbox/bundle_as_wheel.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Package up Grist code as a stand-alone wheel.
# This is useful for grist-static.
# It is the reason why MANIFEST.in and setup.py are present.
set -e
# Clean up any previous packaging.
rm -rf dist foo.egg-info grist.egg-info build
# Go ahead and run packaging again.
python setup.py bdist_wheel
echo ""
echo "Result is in the dist directory:"
ls dist

15
sandbox/setup.py Normal file
View File

@@ -0,0 +1,15 @@
# see bundle_as_wheel.sh
from distutils.core import setup
import glob
files = glob.glob('grist/*.py') + glob.glob('grist/**/*.py')
names = [f.split('.py')[0] for f in files]
setup(name='grist',
version='1.0',
include_package_data=True,
packages=['grist', 'grist/functions', 'grist/imports'],
package_data={
'grist': ['grist/tzdata.data'],
})

View File

@@ -7,13 +7,17 @@ export GRIST_EXT=stubs
if [[ -e ext/app ]]; then
PROJECT="tsconfig-ext.json"
fi
WEBPACK_CONFIG=buildtools/webpack.config.js
if [[ -e ext/buildtools/webpack.config.js ]]; then
WEBPACK_CONFIG=ext/buildtools/webpack.config.js
fi
if [ ! -e _build ]; then
buildtools/build.sh
fi
tsc --build -w --preserveWatchOutput $PROJECT &
catw app/client/*.css app/client/*/*.css -o static/bundle.css -v & webpack --config buildtools/webpack.config.js --mode development --watch &
catw app/client/*.css app/client/*/*.css -o static/bundle.css -v & webpack --config $WEBPACK_CONFIG --mode development --watch &
NODE_PATH=_build:_build/stubs:_build/ext nodemon --delay 1 -w _build/app/server -w _build/app/common _build/stubs/app/server/server.js &
wait