Compare commits
	
		
			2 commits
		
	
	
		
			2d6e35a333
			...
			f16bbd43fc
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f16bbd43fc | |||
| 55aa3f4dca | 
					 3 changed files with 20 additions and 3 deletions
				
			
		
							
								
								
									
										2
									
								
								.github/workflows/deploy.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/deploy.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -21,7 +21,7 @@ jobs:
 | 
			
		|||
      - uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Build with Gradle
 | 
			
		||||
        run: ./gradlew :build
 | 
			
		||||
        run: ./gradlew :build --info
 | 
			
		||||
 | 
			
		||||
      - name: Copy files to server
 | 
			
		||||
        run: |
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										15
									
								
								build.gradle
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								build.gradle
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -160,6 +160,7 @@ tasks.register('buildStaticFiles', Copy) {
 | 
			
		|||
 | 
			
		||||
  dependsOn 'installAntville'
 | 
			
		||||
  dependsOn 'installNodeModules'
 | 
			
		||||
  dependsOn 'buildClient'
 | 
			
		||||
  dependsOn 'buildMainScript'
 | 
			
		||||
  dependsOn 'buildMainStyles'
 | 
			
		||||
  dependsOn 'buildEditorScript'
 | 
			
		||||
| 
						 | 
				
			
			@ -177,6 +178,20 @@ tasks.register('buildStaticFiles', Copy) {
 | 
			
		|||
  into outputDir
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tasks.register('buildClient', Exec) {
 | 
			
		||||
  def inputDir = "${project.projectDir}/client"
 | 
			
		||||
  def outputDir = "$antvilleBuildDir/static/scripts"
 | 
			
		||||
 | 
			
		||||
  commandLine 'node', 'client/build.mjs', outputDir
 | 
			
		||||
 | 
			
		||||
  doLast {
 | 
			
		||||
    copy {
 | 
			
		||||
      from "${project.projectDir}/static/scripts"
 | 
			
		||||
      into outputDir
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
['main', 'editor', 'gallery'].each { name ->
 | 
			
		||||
  tasks.register("build${name.capitalize()}Script", NpmTask) {
 | 
			
		||||
    description "Build the ${name} client-side scripts."
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,9 +3,11 @@
 | 
			
		|||
import esbuild from 'esbuild';
 | 
			
		||||
import babel from 'esbuild-plugin-babel';
 | 
			
		||||
 | 
			
		||||
const outdir = process.argv[2] || './static/scripts';
 | 
			
		||||
 | 
			
		||||
esbuild.build({
 | 
			
		||||
  outdir,
 | 
			
		||||
  define: { 'process.env.NODE_ENV': '"production"' },
 | 
			
		||||
  outdir: 'static/scripts',
 | 
			
		||||
  entryPoints: [
 | 
			
		||||
    './client/code-mirror.mjs'
 | 
			
		||||
  ],
 | 
			
		||||
| 
						 | 
				
			
			@ -20,7 +22,7 @@ esbuild.build({
 | 
			
		|||
  plugins: [
 | 
			
		||||
    babel({
 | 
			
		||||
      filter: /\.m?js$/,
 | 
			
		||||
      configFile: './babel.config.json'
 | 
			
		||||
      configFile: './client/babel.config.json'
 | 
			
		||||
    })
 | 
			
		||||
  ]
 | 
			
		||||
}).catch(() => process.exit(1));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue