Skip to content
Snippets Groups Projects
Verified Commit 094248ef authored by David Beniamine's avatar David Beniamine
Browse files

WIP using workspaces

Currently initial build is working, we got hotbuild on plugin edition

But changes on plugins are not updated, I guess they are not rebuilt
parent 00aa6b72
Branches
No related tags found
No related merge requests found
node_modules/ node_modules/
./*/node_modules/ ./*/node_modules/
annotot-db/ annotot-db/
.cache
build_deps.sh 100644 → 100755
#!/bin/bash #!/bin/bash
cd mirador-video-annotation declare -A SUBMODULES=(
docker run --rm -v $PWD:/opt -it node:12 /bin/sh -c "cd /opt && npm install && npm run build:es" ['mirador-video-annotation']="build:es"
cd ../annotations-plugin ['annotations-plugin']="build"
docker run --rm -v $PWD:/opt -it node:12 /bin/sh -c "cd /opt && npm install && npm run build" )
run_on_modules(){
for mod in "${!SUBMODULES[@]}"; do
echo -e "\t$mod"
cd $mod
npm run ${SUBMODULES[${mod}]}
cd ..
done
}
echo "Installing dependencies"
npm install
echo "Compiling submodules"
run_on_modules build
This diff is collapsed.
...@@ -4,26 +4,24 @@ ...@@ -4,26 +4,24 @@
"description": "", "description": "",
"private": true, "private": true,
"scripts": { "scripts": {
"postinstall": "submodules-install", "prebuild": "./build_deps.sh",
"build": "webpack --config webpack.config.js", "build": "webpack --config webpack.config.js",
"serve": "npm install && webpack serve --config webpack.config.js" "preserve": "npm run build",
"serve": "webpack serve --config webpack.config.js"
}, },
"submodules": [
"mirador-video-annotation/*",
"annotations-plugin/*"
],
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"dotenv-webpack": "^8.0.1", "dotenv-webpack": "^8.0.1",
"mirador": "file:mirador-video-annotation",
"mirador-annotations": "file:annotations-plugin",
"react": "^16.13.1", "react": "^16.13.1",
"react-dom": "^16.13.1", "react-dom": "^16.13.1",
"style-loader": "^1.2.1", "style-loader": "^1.2.1"
"submodules-install": "1.0.2"
}, },
"workspaces": [
"mirador-video-annotation/",
"annotations-plugin/"
],
"devDependencies": { "devDependencies": {
"webpack": "^4.43.0", "webpack": "^4.43.0",
"webpack-cli": "^4.3.12", "webpack-cli": "^4.3.12",
......
import Mirador from 'mirador/dist/es/src/index'; import Mirador from 'mirador/dist/es/src/index';
import LocalCatalog from './catalog.js';
import * as actions from 'mirador/dist/es/src/state/actions'; import * as actions from 'mirador/dist/es/src/state/actions';
import annotationPlugins from 'mirador-annotations/es/index'; import annotationPlugins from 'mirador-annotations/es/index';
import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter'; import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter';
......
...@@ -12,6 +12,7 @@ module.exports = { ...@@ -12,6 +12,7 @@ module.exports = {
}, },
devServer: { devServer: {
hot: true, hot: true,
liveReload: true,
watchFiles: ['src/**/*', '*/src/**/*'], watchFiles: ['src/**/*', '*/src/**/*'],
client: { client: {
logging: 'verbose', logging: 'verbose',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment