-
-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copying font-awesome fonts might fails #1595
Comments
@sijad Can you clarify what failure you are encountering? Write permissions? |
Theoretically, there should be no write permissions as the web installation does not let you install Flarum without write access to |
i thought it was related to permissions, I'll check again. and no i was using web installer. |
@sijad Users can update FA 5 manually, as components/font-awesome is stuck at 5.0.6 and the latest FA is 5.3.1... though that would be a different issue than here. |
Can't we use the newly introduced webpack functionality to take care of all this? FA is available in npm as well, we can configure webpack to deal with the font by publishing it to the assets directory. This will reduce the complexity in our composer file, ensure the fonts exist every time the compilation is being ran and offers a later version of FA. |
EDIT: Nvm, I misread your second sentence. That could be done with {
test: /\.(|woff|woff2|eot|ttf)$/i,
use: [
{
loader: 'file-loader',
options: {
name: '../assets/fonts/[name].[ext]',
context: 'src',
}
}
]
} |
@datitisev yes sorry I wanted to PR it, but didn't get it working in time. Here's the snippet I used in another project: {
test: /\.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
exclude: path.resolve(__dirname, 'assets/'),
use: [{
loader: 'file-loader',
options: {
useRelativePath: false,
outputPath: 'webfonts/',
publicPath: '../webfonts/',
name: '[name].[ext]'
}
}]
}, |
Remember that webpack doesn't run on production installations, only on development installations. |
@tobscure The plan here would be to have the fonts in an |
Ah I see. I don't believe there's any code that would copy as |
If #1644 is implemented this would be the place to try copying the fonts again. |
I believe this issue is actually solved since assets copy was moved to the #1644 can be used to track the possible change from I suggest we close this. |
I'm fine with closing as well. |
Bug Report
Current Behavior
font-awesome fonts will copy to
public/assets/fonts
only once after installation:https://github.com/flarum/core/blob/8474dfd6e2cc8298176f0e088f0786ef099d0b73/src/Install/Console/InstallCommand.php#L323-L329
copyDirectory
does not throw any errors, if it fails install will continue.there's no easy way to copy fonts after installations.
Expected Behavior
fonts files should be copied in other occasions like clearing the cache or after migrations.
Environment
Possible Solution
copyDirectory
result and throw an error.cache:clear
command.The text was updated successfully, but these errors were encountered: