Skip to content

Conversation

@chrisjimallen
Copy link

Have a look, see what you think and feel free to change whatever you like ;)

@chrisjimallen chrisjimallen changed the title Added Bootstrap & Fontawseome. Added Bootstrap & Fontawesome. Feb 4, 2018

<div class="starter-template">
<h1>Webpack 3 QuickStarter Template!</h1>
<i class="fa fa-thermometer-three-quarters" aria-hidden="true"></i>
Copy link
Author

Choose a reason for hiding this comment

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

Its just to demonstrate the font awesome is working correctly.

@@ -0,0 +1,3 @@
module.exports = {
"extends": "standard"
Copy link
Author

Choose a reason for hiding this comment

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

Added standard linting, as it seems to be the least annoying.

"babel-preset-env": "~1.6.0",
"clean-webpack-plugin": "~0.1.17",
"css-loader": "~0.28.7",
"eslint": "^4.16.0",
Copy link
Author

Choose a reason for hiding this comment

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

All of these linting packages aren't really necessary. Feel free to remove what you like.

},
// file-loader(for images)
{ test: /\.(jpg|png|gif|svg)$/, use: [ { loader: 'file-loader', options: { name: '[name].[ext]', outputPath: './assets/media/' } } ] },
{ test: /\.(jpg|png|gif|svg)$/, exclude: /(\/fonts)/, use: [{ loader: 'file-loader', options: { name: '[name].[ext]', outputPath: './assets/media/' } }] },
Copy link
Author

Choose a reason for hiding this comment

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

Excludes fonts directory as font awesome also uses SVG fonts.

// file-loader(for fonts)
{ test: /\.(woff|woff2|eot|ttf|otf)$/, use: ['file-loader'] }

{ test: /\.(woff|woff2|eot|ttf|otf|svg)$/, exclude: path.resolve(__dirname, 'assets', 'media'), use: [{ loader: 'file-loader', options: { name: '[name].[ext]', outputPath: './assets/fonts/' } }] }
Copy link
Author

Choose a reason for hiding this comment

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

Exclude the media directory, as we only care about fonts here.

@arnirjhor
Copy link
Owner

Hi @chrisjimallen, Sorry that I've been here like a month later after a long vacation. It was so great to have you contributing on this repo. And I can't thank you enough for that. And I was thinking about merging your changes into the repo. But I had another thought, because the article was only for the basic boilerplate with webpack and honestly speaking I don't use bootstrap anymore, and maybe the readers of this article might not too. I guess, it will be a better decision to create a new branch while your changes will be merged and we can manage another boilerplate for bootstrap and fontawesome setting on webpack.
Would love to have your feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants