This repository was archived by the owner on Nov 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-19
lines changed Expand file tree Collapse file tree 3 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ describe('tauri:build', () => {
66 const project = await create ( 'build' )
77 await project . run ( 'vue-cli-service tauri:build' )
88 // Web code is built
9- expect ( project . has ( 'dist_tauri /webpack_dist/index.html' ) ) . toBe ( true )
9+ expect ( project . has ( 'src-tauri/target /webpack_dist/index.html' ) ) . toBe ( true )
1010 // Tauri app is built
11- expect ( project . has ( 'dist_tauri/release/app' ) ) . toBe ( true )
12- expect ( project . has ( 'dist_tauri/release/bundle/appimage/app.AppImage' ) ) . toBe ( true )
13- expect ( project . has ( 'dist_tauri/release/bundle/deb/app_0.1.0_amd64.deb' ) ) . toBe ( true )
11+ expect ( project . has ( 'src-tauri/target/release/app' ) ) . toBe ( true )
12+ expect (
13+ project . has ( 'src-tauri/target/release/bundle/appimage/app.AppImage' )
14+ ) . toBe ( true )
15+ expect (
16+ project . has ( 'src-tauri/target/release/bundle/deb/app_0.1.0_amd64.deb' )
17+ ) . toBe ( true )
1418 } )
1519} )
Original file line number Diff line number Diff line change 11const execa = require ( 'execa' )
22const { error } = require ( '@vue/cli-shared-utils' )
3- const fs = require ( 'fs-extra' )
43const init = require ( 'tauri/dist/api/init' )
54
65module . exports = async ( api , options ) => {
@@ -30,15 +29,4 @@ module.exports = async (api, options) => {
3029 'tauri:build' : 'vue-cli-service tauri:build'
3130 }
3231 } )
33- api . onCreateComplete ( ( ) => {
34- // Update .gitignore if it exists
35- if ( fs . existsSync ( api . resolve ( './.gitignore' ) ) ) {
36- let gitignore = fs . readFileSync ( api . resolve ( './.gitignore' ) , 'utf8' )
37- if ( ! / ( # T a u r i b u i l d o u t p u t | \/ d i s t _ t a u r i ) / . test ( gitignore ) ) {
38- // Add /dist_tauri to .gitignore if it doesn't exist already
39- gitignore = gitignore + '\n#Tauri build output\n/dist_tauri'
40- fs . writeFileSync ( api . resolve ( './.gitignore' ) , gitignore )
41- }
42- }
43- } )
4432}
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ module.exports = (api, options) => {
7272 if ( ! args . skipBundle ) {
7373 try {
7474 await api . service . run ( 'build' , {
75- dest : 'dist_tauri /webpack_dist'
75+ dest : 'src-tauri/target /webpack_dist'
7676 } )
7777 } catch ( e ) {
7878 error (
@@ -82,12 +82,11 @@ module.exports = (api, options) => {
8282 }
8383 }
8484
85- process . env . CARGO_TARGET_DIR = api . resolve ( 'dist_tauri' )
8685 build ( {
8786 build : {
8887 // Has to be a non-empty string, value doesn't matter
8988 devPath : ' ' ,
90- distDir : '../dist_tauri /webpack_dist'
89+ distDir : './target /webpack_dist'
9190 } ,
9291 ctx : { debug : args . debug } ,
9392 verbose : args . verbose
You can’t perform that action at this time.
0 commit comments