Skip to content

Commit

Permalink
revert Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
tconte-pass committed Sep 19, 2024
1 parent 2fffe9e commit efe641a
Show file tree
Hide file tree
Showing 28 changed files with 3,031 additions and 1,338 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: '4 [on_workflow] Android deploy'
name: "4 [on_workflow] Android deploy"

on:
workflow_call:
Expand All @@ -17,7 +17,7 @@ on:

jobs:
sentry_and_deploy:
name: 'Install runtime environment and dependencies Android deploy'
name: "Install runtime environment and dependencies Android deploy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/dev_on_workflow_web_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: '4 [on_workflow] Deploy web'
name: "4 [on_workflow] Deploy web"

on:
workflow_call:
Expand Down Expand Up @@ -61,19 +61,27 @@ jobs:
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 416.0.0'
- name: 'Render Sentry Template'
id: render_template
uses: chuhlomin/[email protected]
with:
template: templates_github_ci/.sentryclirc
vars: |
token: ${{ steps.secrets.outputs.SENTRY_AUTH_TOKEN }}
result_path: .sentryclirc
- name: 'Push debug log for testing'
if: ${{ inputs.ENV == 'testing' }}
run: |
export SENTRY_LOG_LEVEL="debug"
export SENTRY_LOG_LEVEL="debug webpack -c web/config/webpack.config.js"
- name: 'Build web for input env'
run: |
NODE_OPTIONS='--max-old-space-size=4096' UPLOAD_SOURCEMAPS_TO_SENTRY=true yarn build:${{ inputs.ENV }}
- name: 'Push assets to bucket'
run: |
gsutil rsync -x "index\.html$" -r dist gs://${{ inputs.BUCKET_NAME }}
gsutil rsync -x "index\.html$" -r build gs://${{ inputs.BUCKET_NAME }}
- name: 'Push index.html to bucket'
run: |
gsutil cp dist/index.html gs://${{ inputs.BUCKET_NAME }}
gsutil cp build/index.html gs://${{ inputs.BUCKET_NAME }}
slack_notify:
runs-on: ubuntu-latest
if: ${{ always() }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ vendor/

# local settings
.env.development
.env.local

# Google service
google-services.json
Expand Down
8 changes: 4 additions & 4 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require('path')
const paths = require('../web/config/paths')

const appSrc = path.resolve('./src/')
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
Expand All @@ -25,9 +25,9 @@ module.exports = {
__mocks__: './__mocks__',

'react-native-linear-gradient': 'react-native-web-linear-gradient',
'react-native-fast-image': path.join(appSrc, 'libs/react-native-web-fast-image'),
'react-native-email-link': path.join(appSrc, 'libs/react-native-email-link'),
'react-native-share': path.join(appSrc, 'libs/react-native-share'),
'react-native-fast-image': path.join(paths.appSrc, 'libs/react-native-web-fast-image'),
'react-native-email-link': path.join(paths.appSrc, 'libs/react-native-email-link'),
'react-native-share': path.join(paths.appSrc, 'libs/react-native-share'),
},
modulesToTranspile: ['@ptomasroos/react-native-multi-slider'],
},
Expand Down
4 changes: 2 additions & 2 deletions .ts-prunerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"ignore": "(.*\\.ios)|(.*\\.android)|(.*\\.web)|(src/api/gen/.*)|(.*/fixtures/.*)",
"skip": "(src/web/.*)|(.*\\.stories\\.tsx)|(src/ui/storybook/.*)|(src/libs/monitoring/sentry\\.ts)|(src/libs/react-native-animatable/index\\.ts)|(src/libs/react-native-batch/index\\.ts)|(src/libs/react-native-share/index\\.tsx)|(src/libs/react-native-web-fast-image/index\\.((d\\.ts)|(js)))|(jest/.*)|(src/tests/utils\\.tsx)|(src/tests/utils/web\\.tsx)|(.*__mocks__/.*)|(src/features/internal/cheatcodes/.*)"
"ignore": "(.*\\.ios)|(.*\\.android)|(.*\\.web)|(src/api/gen/.*)|(.*\/fixtures\/.*)",
"skip": "(src/web/.*)|(web/config/.*)|(.*\\.stories\\.tsx)|(src/ui/storybook/.*)|(src/libs/monitoring/sentry\\.ts)|(src/libs/react-native-animatable/index\\.ts)|(src/libs/react-native-batch/index\\.ts)|(src/libs/react-native-share/index\\.tsx)|(src/libs/react-native-web-fast-image/index\\.((d\\.ts)|(js)))|(jest/.*)|(src/tests/utils\\.tsx)|(src/tests/utils/web\\.tsx)|(.*__mocks__/.*)|(src/features/internal/cheatcodes/.*)"
}
11 changes: 7 additions & 4 deletions doc/development/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ We use css-in-js with `styled-components` to customize our components, in some c

## Base css

We can add any css file in `App.web.tsx` and it will be included in the bundle.
We use `public/index.html` as the main entrypoint of our web application, which can include base css for our app.

```js
import 'reset-css'
```
> This will reduce the amount of requests to get assets. Also, it will later be minified during build.
You can add base css in `web/css`, it will be automatically injected in `index.html`.

- Use a two digit and dash prefix for ordering the css, ex: `11-` : `11-mycss.css`
- Append `dev-` to the digit if it's only required in development, ex: (`11-dev-mycss.css`)
187 changes: 0 additions & 187 deletions doc/development/general-info-web.md

This file was deleted.

6 changes: 2 additions & 4 deletions doc/development/optimization.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## Web

Deprecated: not on vite yet

### Analyze production build

Set `BUNDLE_ANALYZER` environment variable to visualize what's bundled in production:
Expand Down Expand Up @@ -140,7 +138,7 @@ tslib (Found 2 resolved, 2 installed, 13 depended. Latest 2.3.1.)
https://github.com/FormidableLabs/inspectpack/#fixing-bundle-duplicates
```

You can now try to upgrade the module to optimize what is deduped,
You can now try to upgrade the module to optimize what is deduped,
and open issue on repo so that package maintainer update their dependencies to allow deduping of it.

We strongly advised to read the [Diagnosing duplicates](https://github.com/FormidableLabs/inspectpack#diagnosing-duplicates) part of the module documentation.
We strongly advised to read the [Diagnosing duplicates](https://github.com/FormidableLabs/inspectpack#diagnosing-duplicates) part of the module documentation.
12 changes: 9 additions & 3 deletions doc/installation/sentry.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ The build is configured to upload the source maps automatically, on every new re

### 🗝 Configure sentry cli

Create a new `.env.local` containing your `SENTRY_AUTH_TOKEN`
- add a file `~/.sentryclirc`:

```sh
SENTRY_AUTH_TOKEN=your_super_secret_token
```
[defaults]
url = https://sentry.passculture.team/
org = sentry
project = application-native
[auth]
token=<token>
```

> Click [here](https://sentry.passculture.team/settings/account/api/auth-tokens/) to generate your own auth `<token>`, use the following scope permissions: `event:read`, `event:admin`, `member:read`, `org:read`, `project:read`, `project:releases`, `team:read`, `project:write`, `org:integrations`
Expand Down
2 changes: 0 additions & 2 deletions doc/installation/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ To run the **pass Culture** web application on your browser, simply run:
- `yarn start:web:testing` to run the app in testing environment.

You can choose between multiple environments (development, testing, staging, integration & production). See `package.json` to see the available scripts.

For more information about the web app setup, [read more here](../development/general-info-web.md).
Loading

0 comments on commit efe641a

Please sign in to comment.