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

Attempted to add Bootstrap to app #8

Closed
wants to merge 2 commits into from
Closed

Conversation

Noewel
Copy link
Collaborator

@Noewel Noewel commented Jul 28, 2017

Installed file-loader and url-loader dependencies, Added loaders to webpack.config.js, Imported bootstrap into main.js. I downloaded the compiled and minified CSS, JavaScript, and fonts from getbootstrap.com and dropped them into the app folder(Not entirely sure if this was necessary; probably why there are so many changed files).

@@ -1,10 +1,9 @@
var React = require('react');
var styles = require('./App.css');

Choose a reason for hiding this comment

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

Let's continue to use this line to require our styles for the app.

@@ -1,5 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.js';
import Bootstrap from './bootstrap/dist/css/bootstrap.css'

Choose a reason for hiding this comment

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

This line isn't required

@@ -6,6 +6,7 @@
<title>Zero Waste</title>
<meta name="description" content="We're reaching zero waste... and having fun doing it">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel = "stylesheet" href="bootstrap/dist/css/bootstrap.css">

Choose a reason for hiding this comment

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

Remove Line -Webpack will handle all of our assets (CSS/JS) for the app.

@EdwardReed
Copy link

EdwardReed commented Jul 28, 2017

@Noewel In most of our files JS/CSS we should be able to require or import require styles and libs. Take a look at facebook/create-react-app#301 (comment)

So adding the bootstrap repo isn't required.
Interface/app/bootstrap/

@@ -1,10 +1,9 @@
var React = require('react');
var styles = require('./App.css');
var styles = require('./bootstrap/dist/css/bootstrap.css');
Copy link

@EdwardReed EdwardReed Jul 28, 2017

Choose a reason for hiding this comment

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

@DeliSauce DeliSauce closed this Aug 30, 2017
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.

4 participants