Skip to content

Commit f382e21

Browse files
authored
studio dbg checkpoint (#830)
- **studio-ui w/ qtype discovery roadmapping** - **[cli] bundle studio src rather than built studio** - **rm extra config file** - **[cli] bundle studio-ui deps, massage for build** - **[cli].studio - add .skuilder template directory** - **[cli].studio - hash questions dir for build ID** - **[cli].studio - checking for cached build locations** - **[cli].studio - build decision logic (if cached...)** - **[cli].studio: add default build fcn, error handles** - **[cli].studio: bundle questions as consumable lib** - **[cli].studio: add lib build cfg to scaffolded crs** - **fix: export composable with question base types...** - **fix: allow express and pui to run at once...** - **ignore .skuilder working dir for cli tools** - **ignore pouchdb data dumps from node-runtime `db`** - **add express stop fcn** - **[cli].studio: cp built questions to studio-ui** - **publish edit-ui** - **build and serve studio-ui** - **tweaking patched cfg file locations** - **tweaking patched dist file location, lablelling** - **aggressively bundle for monkeypatching** - **[tmp] dbg logging** - **tweaking patched dist file location, lablelling** - **use dynamic current version for patching deps** - **null-check `global` elo prop** - **add alpha bumping script** - **bump:alpha** - **handle expected, throw unexpected error** - **linting fixes** - **exclude tmp testproject from linting** - **linting fixes** - **match other pkg versiosn** - **add utils to parse imported qTypes** - **rm hardcoded courses.length** - **silence noisy log** - **[studio] register custom qTypes on startup**
2 parents fae542b + 147f7d8 commit f382e21

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2260
-174
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ vue/Caddyfile
4444

4545
# specific pattern to place tmp files that should be ignored
4646
ignore
47+
48+
# node pouchdb userdbs that get popped by `db` package sometimes. nuisance.
49+
userdb-Guest

agent/a.4.todo.md

Lines changed: 293 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@
44
"setup": "yarn && git submodule update --init --recursive && yarn build:lib",
55
"dev": "yarn workspace @vue-skuilder/common build && yarn workspace @vue-skuilder/db build && yarn workspace @vue-skuilder/common-ui build && yarn workspace @vue-skuilder/courses build && yarn workspace @vue-skuilder/edit-ui build && node scripts/dev-couchdb.js start && concurrently \"yarn dev:platform-ui\" \"yarn dev:express\"",
66
"dev:watch": "node scripts/dev-watch.js",
7-
"dev:platform": "yarn couchdb:start && yarn workspace @vue-skuilder/express dev && yarn workspace @vue-skuilder/platform-ui dev",
7+
"dev:platform": "yarn couchdb:start && yarn workspace @vue-skuilder/express dev & yarn workspace @vue-skuilder/platform-ui dev",
88
"couchdb:start": "node scripts/dev-couchdb.js start",
99
"couchdb:stop": "node scripts/dev-couchdb.js stop",
1010
"couchdb:status": "node scripts/dev-couchdb.js status",
1111
"couchdb:remove": "node scripts/dev-couchdb.js remove",
1212
"postdev": "node scripts/dev-couchdb.js stop",
13+
"stop:express": "lsof -ti:3000 | xargs kill -9 2>/dev/null || true",
1314
"build": "yarn workspace @vue-skuilder/common build && yarn workspace @vue-skuilder/db build && yarn workspace @vue-skuilder/common-ui build && yarn workspace @vue-skuilder/courses build && yarn workspace @vue-skuilder/edit-ui build && yarn workspace @vue-skuilder/platform-ui build && yarn workspace @vue-skuilder/express build",
1415
"build:lib": "yarn workspace @vue-skuilder/common build && yarn workspace @vue-skuilder/db build && yarn workspace @vue-skuilder/common-ui build && yarn workspace @vue-skuilder/courses build && yarn workspace @vue-skuilder/edit-ui build",
1516
"build:pui": "yarn build:lib && yarn workspace @vue-skuilder/platform-ui build && yarn workspace @vue-skuilder/express build",
1617
"build:sui": "yarn build:lib && yarn workspace @vue-skuilder/standalone-ui build",
1718
"clean": "yarn clean:dist && yarn clean:node_modules",
1819
"clean:dist": "find packages -name 'dist' -type d -exec rm -rf {} +",
1920
"clean:node_modules": "find . -name 'node_modules' -type d -exec rm -rf {} +",
20-
"clean:all": "yarn clean && rm -rf .pnp.* .yarn/cache .yarn/install-state.gz",
21+
"clean:hard": "yarn clean && rm -rf .pnp.* .yarn/cache .yarn/install-state.gz",
2122
"test:e2e-db": "yarn workspace @vue-skuilder/e2e-db test:e2e",
2223
"test:e2e-db-watch": "yarn workspace @vue-skuilder/e2e-db test:watch",
2324
"bump:patch": "yarn workspaces foreach --all --exclude vue-skuilder version patch --immediate",
24-
"bump:minor": "yarn workspaces foreach --all --exclude vue-skuilder version minor --immediate"
25+
"bump:minor": "yarn workspaces foreach --all --exclude vue-skuilder version minor --immediate",
26+
"bump:alpha": "yarn workspaces foreach --all --exclude vue-skuilder version prerelease --immediate"
2527
},
2628
"private": true,
2729
"workspaces": [

packages/cli/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import backendConfig from '../../eslint.config.backend.mjs';
33
export default [
44
...backendConfig,
55
{
6-
ignores: ['node_modules/**', 'dist/**', 'eslint.config.mjs', 'tsconfig.json'],
6+
ignores: ['node_modules/**', 'dist/**', 'eslint.config.mjs', 'tsconfig.json', 'testproject/**'],
77
},
88
{
99
languageOptions: {

packages/cli/package.json

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.7",
6+
"version": "0.1.8-0",
77
"type": "module",
88
"description": "CLI scaffolding tool for vue-skuilder projects",
99
"bin": {
@@ -18,11 +18,11 @@
1818
}
1919
},
2020
"scripts": {
21-
"build": "rm -rf dist && npm run build:studio-ui && npm run build:express && tsc && npm run embed:studio-ui && npm run embed:express",
22-
"build:studio-ui": "cd ../studio-ui && npm run build",
21+
"build": "rm -rf dist && npm run build:express && tsc && npm run embed:studio-ui-src && npm run embed:express && npm run embed:templates",
2322
"build:express": "cd ../express && npm run build",
24-
"embed:studio-ui": "mkdir -p dist/studio-ui-assets && cp -r ../studio-ui/dist/* dist/studio-ui-assets/",
23+
"embed:studio-ui-src": "mkdir -p dist/studio-ui-src && cp -r ../studio-ui/src/* dist/studio-ui-src/ && cp ../studio-ui/package.json dist/studio-ui-src/ && cp ../studio-ui/vite.config.ts dist/studio-ui-src/ && cp ../studio-ui/tsconfig.json dist/studio-ui-src/ && cp ../studio-ui/index.html dist/studio-ui-src/ && cp ../../vite.config.base.js dist/studio-ui-src/ && sed -i 's|../../vite.config.base.js|./vite.config.base.js|' dist/studio-ui-src/vite.config.ts && sed -i 's|resolve(__dirname, \\.\\., \\.\\.)|resolve(__dirname)|' dist/studio-ui-src/vite.config.ts && sed -i 's|/src/main.ts|./main.ts|' dist/studio-ui-src/index.html",
2524
"embed:express": "mkdir -p dist/express-assets && cp -r ../express/dist/* dist/express-assets/ && cp -r ../express/assets dist/express-assets/",
25+
"embed:templates": "mkdir -p dist/templates && cp -r templates/.skuilder dist/templates/",
2626
"dev": "tsc --watch",
2727
"lint": "npx eslint .",
2828
"lint:fix": "npx eslint . --fix",
@@ -38,26 +38,39 @@
3838
"course"
3939
],
4040
"dependencies": {
41+
"@mdi/font": "^7.3.67",
42+
"@vue-skuilder/common": "workspace:*",
43+
"@vue-skuilder/common-ui": "workspace:*",
44+
"@vue-skuilder/courses": "workspace:*",
4145
"@vue-skuilder/db": "workspace:*",
42-
"@vue-skuilder/standalone-ui": "^0.1.7",
46+
"@vue-skuilder/edit-ui": "workspace:*",
47+
"@vue-skuilder/standalone-ui": "^0.1.8-0",
4348
"chalk": "^5.3.0",
4449
"commander": "^11.0.0",
4550
"fs-extra": "^11.2.0",
4651
"inquirer": "^9.2.0",
52+
"pinia": "^2.3.0",
4753
"pouchdb": "^9.0.0",
48-
"serve-static": "^1.15.0"
54+
"serve-static": "^1.15.0",
55+
"vue": "^3.5.13",
56+
"vue-router": "^4.2.0",
57+
"vuetify": "^3.7.0"
4958
},
5059
"devDependencies": {
5160
"@types/fs-extra": "^11.0.0",
5261
"@types/inquirer": "^9.0.0",
5362
"@types/node": "^20.0.0",
5463
"@types/serve-static": "^1.15.0",
64+
"@vitejs/plugin-vue": "^5.2.1",
5565
"@vue-skuilder/express": "workspace:*",
5666
"@vue-skuilder/studio-ui": "workspace:*",
57-
"typescript": "~5.7.2"
67+
"typescript": "~5.7.2",
68+
"vite": "^6.0.9",
69+
"vue-tsc": "^1.8.0"
5870
},
5971
"engines": {
6072
"node": ">=18.0.0"
6173
},
62-
"packageManager": "yarn@4.6.0"
74+
"packageManager": "yarn@4.6.0",
75+
"stableVersion": "0.1.7"
6376
}

packages/cli/src/cli.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ const __dirname = dirname(__filename);
1616
const packagePath = join(__dirname, '..', 'package.json');
1717
const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'));
1818

19+
export const VERSION: string = packageJson.version;
20+
1921
const program = new Command();
2022

2123
program
2224
.name('skuilder')
2325
.description('CLI tool for scaffolding Skuilder course applications')
24-
.version(packageJson.version);
26+
.version(VERSION);
2527

2628
// Add commands
2729
program.addCommand(createInitCommand());

0 commit comments

Comments
 (0)