File tree 7 files changed +978
-0
lines changed
7 files changed +978
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Web preview for source code
2
+
3
+ ## ES Preview with Vite
4
+
5
+ - Go to Directory: [ ` preview/es ` ] ( ./es/ )
6
+
7
+ ## Flutter Preview with Flutter Daemon ([ gridaco/flutter] ( https://github.com/gridaco/flutter ) )
8
+
9
+ - Go to Repository: [ gridaco/flutter] ( https://github.com/gridaco/flutter )
10
+
11
+ ## Testing & Capabilities
12
+
13
+ - .env loading
14
+ - monorepo
15
+ - nextjs
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ const App: React.FC = () => {
5
5
return (
6
6
< div >
7
7
< h1 > Hello, world!</ h1 >
8
+ < p > Test component for vite</ p >
8
9
</ div >
9
10
) ;
10
11
} ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " @scenes/sandbox-daemon" ,
3
+ "version" : " 0.0.0" ,
4
+ "author" : " Grida Inc." ,
5
+ "homepage" : " https://github.com/gridaco/code" ,
6
+ "scripts" : {
7
+ "build" : " tsup" ,
8
+ "dev" : " tsup --watch"
9
+ },
10
+ "dependencies" : {
11
+ "vite" : " ^4.3.8"
12
+ },
13
+ "devDependencies" : {
14
+ "@types/node" : " ^20.2.3" ,
15
+ "ts-node" : " ^10.9.1" ,
16
+ "tsup" : " ^6.7.0" ,
17
+ "typescript" : " ^5.0.4"
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ import path from "path" ;
2
+ import { createServer } from "vite" ;
3
+
4
+ async function main ( { root } : { root : string } ) {
5
+ const s = await createServer ( {
6
+ configFile : false ,
7
+ root : root ,
8
+ base : "/s/" ,
9
+ // server: {
10
+ // middlewareMode: true,
11
+ // },
12
+ } ) ;
13
+
14
+ // file change
15
+ s . watcher . on ( "change" , ( file ) => {
16
+ console . log ( "change" , file ) ;
17
+ } ) ;
18
+
19
+ s . listen ( ) ;
20
+ }
21
+
22
+ const root = path . join ( __dirname , "../demos/react" ) ;
23
+ console . log ( "running" , root , "with vite" ) ;
24
+ main ( {
25
+ root : root ,
26
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "target" : " es2020" ,
4
+ "module" : " esnext" ,
5
+ "moduleResolution" : " node" ,
6
+ "esModuleInterop" : true
7
+ },
8
+ "include" : [" src" ],
9
+ "exclude" : [" node_modules" ]
10
+ }
Original file line number Diff line number Diff line change
1
+ import { defineConfig } from "tsup" ;
2
+
3
+ export default defineConfig ( {
4
+ entry : [ "src/index.ts" ] ,
5
+ splitting : false ,
6
+ sourcemap : true ,
7
+ clean : true ,
8
+ } ) ;
You can’t perform that action at this time.
0 commit comments