@@ -78,7 +78,10 @@ export async function transformPackageJson(
7878 // Transform workspace and file dependencies to published versions
7979 if ( packageJson . dependencies ) {
8080 for ( const [ depName , version ] of Object . entries ( packageJson . dependencies ) ) {
81- if ( typeof version === 'string' && ( version . startsWith ( 'workspace:' ) || version . startsWith ( 'file:' ) ) ) {
81+ if (
82+ typeof version === 'string' &&
83+ ( version . startsWith ( 'workspace:' ) || version . startsWith ( 'file:' ) )
84+ ) {
8285 // Replace workspace and file references with CLI's version
8386 packageJson . dependencies [ depName ] = `^${ cliVersion } ` ;
8487 }
@@ -133,7 +136,7 @@ export default defineConfig({
133136 plugins: [
134137 vue(),
135138 // Only include dts plugin for library builds
136- ...(buildMode === 'library'
139+ ...(buildMode === 'library'
137140 ? [dts({
138141 insertTypesEntry: true,
139142 include: ['src/questions/**/*.ts', 'src/questions/**/*.vue'],
@@ -176,7 +179,7 @@ export default defineConfig({
176179 server: {
177180 port: 5173, // Use standard Vite port for standalone projects
178181 },
179- build: buildMode === 'library'
182+ build: buildMode === 'library'
180183 ? {
181184 // Library build configuration
182185 sourcemap: true,
@@ -194,7 +197,7 @@ export default defineConfig({
194197 // External packages that shouldn't be bundled in library mode
195198 external: [
196199 'vue',
197- 'vue-router',
200+ 'vue-router',
198201 'vuetify',
199202 'pinia',
200203 '@vue-skuilder/common',
@@ -211,7 +214,7 @@ export default defineConfig({
211214 'pinia': 'Pinia',
212215 '@vue-skuilder/common': 'VueSkuilderCommon',
213216 '@vue-skuilder/common-ui': 'VueSkuilderCommonUI',
214- '@vue-skuilder/courseware': 'VueSkuilderCourses ',
217+ '@vue-skuilder/courseware': 'VueSkuilderCourseWare ',
215218 '@vue-skuilder/db': 'VueSkuilderDB',
216219 },
217220 exports: 'named',
@@ -227,7 +230,7 @@ export default defineConfig({
227230 : {
228231 // Webapp build configuration (existing)
229232 sourcemap: true,
230- target: 'es2020',
233+ target: 'es2020',
231234 minify: 'terser',
232235 terserOptions: {
233236 keep_classnames: true,
@@ -287,7 +290,11 @@ export async function generateSkuilderConfig(
287290 await fs . writeFile ( configPath , JSON . stringify ( skuilderConfig , null , 2 ) ) ;
288291
289292 // For static data layer without imports, create empty course structure
290- if ( config . dataLayerType === 'static' && ( ! config . importCourseIds || config . importCourseIds . length === 0 ) && outputPath ) {
293+ if (
294+ config . dataLayerType === 'static' &&
295+ ( ! config . importCourseIds || config . importCourseIds . length === 0 ) &&
296+ outputPath
297+ ) {
291298 await createEmptyCourseStructure ( outputPath , skuilderConfig . course ! , config . title ) ;
292299 }
293300}
@@ -338,12 +345,12 @@ async function createEmptyCourseStructure(
338345) : Promise < void > {
339346 const staticCoursesPath = path . join ( projectPath , 'public' , 'static-courses' ) ;
340347 const coursePath = path . join ( staticCoursesPath , courseId ) ;
341-
348+
342349 // Create directory structure
343350 await fs . mkdir ( coursePath , { recursive : true } ) ;
344351 await fs . mkdir ( path . join ( coursePath , 'chunks' ) , { recursive : true } ) ;
345352 await fs . mkdir ( path . join ( coursePath , 'indices' ) , { recursive : true } ) ;
346-
353+
347354 // Create minimal CourseConfig
348355 const courseConfig : CourseConfig = {
349356 courseID : courseId ,
@@ -355,9 +362,9 @@ async function createEmptyCourseStructure(
355362 admins : [ ] ,
356363 moderators : [ ] ,
357364 dataShapes : [ ] ,
358- questionTypes : [ ]
365+ questionTypes : [ ] ,
359366 } ;
360-
367+
361368 // Create manifest.json with proper structure
362369 const manifest = {
363370 version : '1.0.0' ,
@@ -368,29 +375,32 @@ async function createEmptyCourseStructure(
368375 documentCount : 0 ,
369376 chunks : [ ] ,
370377 indices : [ ] ,
371- designDocs : [ ]
378+ designDocs : [ ] ,
372379 } ;
373-
374- await fs . writeFile (
375- path . join ( coursePath , 'manifest.json' ) ,
376- JSON . stringify ( manifest , null , 2 )
377- ) ;
378-
380+
381+ await fs . writeFile ( path . join ( coursePath , 'manifest.json' ) , JSON . stringify ( manifest , null , 2 ) ) ;
382+
379383 // Create empty tags index
380384 await fs . writeFile (
381385 path . join ( coursePath , 'indices' , 'tags.json' ) ,
382386 JSON . stringify ( { tags : [ ] } , null , 2 )
383387 ) ;
384-
388+
385389 // Create CourseConfig chunk
386390 await fs . writeFile (
387391 path . join ( coursePath , 'chunks' , 'CourseConfig.json' ) ,
388- JSON . stringify ( [ {
389- _id : 'CourseConfig' ,
390- ...courseConfig
391- } ] , null , 2 )
392+ JSON . stringify (
393+ [
394+ {
395+ _id : 'CourseConfig' ,
396+ ...courseConfig ,
397+ } ,
398+ ] ,
399+ null ,
400+ 2
401+ )
392402 ) ;
393-
403+
394404 console . log ( chalk . green ( `✅ Created empty course structure for ${ courseId } ` ) ) ;
395405}
396406
@@ -659,13 +669,13 @@ Visit the [Skuilder documentation](https://github.com/NiloCK/vue-skuilder) for m
659669async function createSkuilderDirectory ( projectPath : string ) : Promise < void > {
660670 const skuilderPath = path . join ( projectPath , '.skuilder' ) ;
661671 const templatesPath = path . join ( __dirname , '..' , '..' , 'templates' , '.skuilder' ) ;
662-
672+
663673 // Create .skuilder directory
664674 await fs . mkdir ( skuilderPath , { recursive : true } ) ;
665-
675+
666676 // Create studio-builds subdirectory
667677 await fs . mkdir ( path . join ( skuilderPath , 'studio-builds' ) , { recursive : true } ) ;
668-
678+
669679 // Copy README template if it exists
670680 if ( existsSync ( templatesPath ) ) {
671681 await copyDirectory ( templatesPath , skuilderPath ) ;
0 commit comments