Skip to content

Use auto-generated feature list to set defaults - #2099

Merged
fregante merged 7 commits into
masterfrom
auto-generated-list
Jun 4, 2019
Merged

fregante merged 7 commits into
masterfrom
auto-generated-list

Conversation

@fregante

@fregante fregante commented May 30, 2019 •

Copy link
Copy Markdown
Member

Closes #2098

@fregante fregante added the meta Related to Refined GitHub itself label May 30, 2019
@fregante fregante changed the title Add feature list generator Use auto-generated feature list to set defaults May 30, 2019
Comment thread webpack.config.ts Resolved
fregante added 2 commits May 30, 2019 13:21
This until we find a way to avoid loading content.js in options.html as well
@fregante
fregante marked this pull request as ready for review May 30, 2019 05:37
@fregante

fregante commented May 30, 2019 •

Copy link
Copy Markdown
Member Author

If anyone knows a dynamic replacer (i.e. replace('process.env.LIST', () => listString)) I can avoid the extra file altogether and inline the list in distribution/options-storage.js, but probably as a separate PR.

Edit: found https://github.com/Va1/string-replace-loader!

fregante added 4 commits May 30, 2019 13:42
Where needed, the code will error in the console, no data will be lost
Comment thread webpack.config.ts
loader: 'string-replace-loader',
options: {
search: '__featuresList__',
replace: (() => {

@fregante fregante May 30, 2019 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a function that runs every time the files change, but for now it’s a simple IIFE.

If we find a replacer webpack plug-in that supports functions, the changes will be minimal.

@fregante
fregante merged commit ed0ace7 into master Jun 4, 2019
@fregante
fregante deleted the auto-generated-list branch June 4, 2019 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

Webpack: generate a file containing the list of features

2 participants