Skip to content
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

Added Bootstrap & Fontawesome. #2

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

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.

@@ -18,14 +18,28 @@
"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.

@@ -52,10 +53,9 @@ const config = {
})
},
// 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.

None yet

2 participants