kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
				
				
				
			Rename static --> dist, build-production --> build, output .zip with subdir
							rodzic
							
								
									967bf8f30a
								
							
						
					
					
						commit
						07726bf25c
					
				|  | @ -12,8 +12,8 @@ | |||
| yarn-error.log* | ||||
| /junit.xml | ||||
| 
 | ||||
| /dist/ | ||||
| /static/ | ||||
| /static-test/ | ||||
| /public/ | ||||
| /dist/ | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| /node_modules/** | ||||
| /dist/** | ||||
| /static/** | ||||
| /static-test/** | ||||
| /public/** | ||||
| /tmp/** | ||||
| /coverage/** | ||||
|  |  | |||
|  | @ -11,8 +11,8 @@ yarn-error.log* | |||
| /junit.xml | ||||
| *.timestamp-* | ||||
| 
 | ||||
| /dist/ | ||||
| /static/ | ||||
| /static-test/ | ||||
| /public/ | ||||
| /dist/ | ||||
| 
 | ||||
|  |  | |||
|  | @ -97,7 +97,7 @@ nginx-test: | |||
|     changes: | ||||
|       - "installation/mastodon.conf" | ||||
| 
 | ||||
| build-production: | ||||
| build: | ||||
|   stage: test | ||||
|   script: | ||||
|     - yarn build | ||||
|  | @ -105,12 +105,12 @@ build-production: | |||
|     # # Fail if files got changed. | ||||
|     # # https://stackoverflow.com/a/9066385 | ||||
|     # - git diff --quiet | ||||
|     - cp static/index.html static/404.html | ||||
|     - cp dist/index.html dist/404.html | ||||
|   variables: | ||||
|     NODE_ENV: production | ||||
|   artifacts: | ||||
|     paths: | ||||
|      - static | ||||
|      - dist/ | ||||
| 
 | ||||
| docs-deploy: | ||||
|   stage: deploy | ||||
|  | @ -131,7 +131,7 @@ review: | |||
|     name: review/$CI_COMMIT_REF_NAME | ||||
|     url: https://$CI_COMMIT_REF_SLUG.git.soapbox.pub | ||||
|   script: | ||||
|     - npx -y surge static $CI_COMMIT_REF_SLUG.git.soapbox.pub | ||||
|     - npx -y surge dist $CI_COMMIT_REF_SLUG.git.soapbox.pub | ||||
|   allow_failure: true | ||||
| 
 | ||||
| pages: | ||||
|  | @ -139,7 +139,7 @@ pages: | |||
|   before_script: [] | ||||
|   script: | ||||
|     # artifacts are kept between jobs | ||||
|     - mv static public | ||||
|     - mv dist public | ||||
|   variables: | ||||
|     NODE_ENV: production | ||||
|   artifacts: | ||||
|  |  | |||
|  | @ -14,4 +14,4 @@ ENV FALLBACK_PORT=4444 | |||
| ENV BACKEND_URL=http://localhost:4444 | ||||
| ENV CSP= | ||||
| COPY installation/docker.conf.template /etc/nginx/templates/default.conf.template | ||||
| COPY --from=build /app/static /usr/share/nginx/html | ||||
| COPY --from=build /app/dist /usr/share/nginx/html | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ export default () => ({ | |||
|     NODE_ENV: NODE_ENV || 'development', | ||||
|     BACKEND_URL: sanitizeURL(BACKEND_URL), | ||||
|     FE_SUBDIRECTORY: sanitizeBasename(FE_SUBDIRECTORY), | ||||
|     FE_BUILD_DIR: sanitizePath(FE_BUILD_DIR) || 'static', | ||||
|     FE_BUILD_DIR: sanitizePath(FE_BUILD_DIR) || 'dist', | ||||
|     FE_INSTANCE_SOURCE_DIR: FE_INSTANCE_SOURCE_DIR || 'instance', | ||||
|     SENTRY_DSN, | ||||
|   }, | ||||
|  |  | |||
|  | @ -155,7 +155,7 @@ Options: | |||
| 
 | ||||
| - Any directory name, eg `"public"` | ||||
| 
 | ||||
| Default: `"static"` | ||||
| Default: `"dist"` | ||||
| 
 | ||||
| ### `FE_SUBDIRECTORY` | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ NODE_ENV=development | |||
| - `yarn dev` - Run the local dev server. | ||||
| 
 | ||||
| ## Building | ||||
| - `yarn build` - Compile without a dev server, into `/static` directory. | ||||
| - `yarn build` - Compile without a dev server, into `/dist` directory. | ||||
| 
 | ||||
| ## Translations | ||||
| - `yarn i18n` - Rebuilds app and updates English locale to prepare for translations in other languages. Should always be run after editing i18n strings. | ||||
|  |  | |||
|  | @ -14,7 +14,7 @@ export default defineConfig({ | |||
|   root: 'app', | ||||
|   build: { | ||||
|     // Relative to the root
 | ||||
|     outDir: '../static', | ||||
|     outDir: '../dist', | ||||
|     assetsDir: 'packs', | ||||
|     assetsInlineLimit: 0, | ||||
|     rollupOptions: { | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Alex Gleason
						Alex Gleason