debian-mirror-gitlab/doc/development/new_fe_guide/tips.md

36 lines
1.3 KiB
Markdown
Raw Normal View History

2021-01-29 00:20:46 +05:30
---
stage: none
group: Development
2021-02-22 17:27:13 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2021-01-29 00:20:46 +05:30
---
2018-03-27 19:54:05 +05:30
# Tips
2018-11-08 19:23:39 +05:30
## Clearing production compiled assets
To clear production compiled assets created with `yarn webpack-prod` you can run:
2020-04-22 19:07:51 +05:30
```shell
2018-11-08 19:23:39 +05:30
yarn clean
```
2019-07-07 11:18:12 +05:30
## Creating feature flags in development
2021-04-17 20:07:23 +05:30
The process for creating a feature flag is the same as [enabling a feature flag in development](../feature_flags/index.md#enabling-a-feature-flag-locally-in-development).
2019-07-07 11:18:12 +05:30
Your feature flag can now be:
2021-04-17 20:07:23 +05:30
- [Made available to the frontend](../feature_flags/index.md#frontend) via the `gon`
- Queried in [tests](../feature_flags/index.md#feature-flags-in-tests)
2020-04-22 19:07:51 +05:30
- Queried in HAML templates and Ruby files via the `Feature.enabled?(:my_shiny_new_feature_flag)` method
2019-07-07 11:18:12 +05:30
### More on feature flags
2019-09-04 21:01:54 +05:30
- [Deleting a feature flag](../../api/features.md#delete-a-feature)
2021-04-29 21:17:54 +05:30
- [Manage feature flags](https://about.gitlab.com/handbook/product-development-flow/feature-flag-lifecycle/)
2019-09-04 21:01:54 +05:30
- [Feature flags API](../../api/features.md)
2020-01-01 13:55:28 +05:30
## Running tests locally
This can be done as outlined by the [frontend testing guide](../testing_guide/frontend_testing.md#running-frontend-tests).