Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Create build system #3

Closed
zhon opened this issue May 18, 2015 · 7 comments
Closed

Create build system #3

zhon opened this issue May 18, 2015 · 7 comments

Comments

@zhon
Copy link
Collaborator

zhon commented May 18, 2015

I like to have linting and a build system. Something to watch the filesystem and re-run all the tests.

@zhon
Copy link
Collaborator Author

zhon commented May 28, 2015

@jaketrent, How do we include bootstrap.css into our webpack build system?

I have place a version in the css directory.

@jaketrent
Copy link
Collaborator

You can install bootstrap from npm. Then you'll need the appropriate loaders in webpack. The chain I would probably choose is less-loader, css-loader, style-loader. Then you'll need to import the stylesheet from your app.

If you need help, I can provide additional details and/or code.

@zhon
Copy link
Collaborator Author

zhon commented May 28, 2015

We are not using less. We are probably only using inline styles.

What I am trying to do is include

<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">

into my generated index.html file.

@jaketrent
Copy link
Collaborator

Well, bootstrap src is less. You can import that, or I believe you can
import a built css version. If you use the style-loader, you can get style
tags inserted into your head tag. If you use the extract text plugin, you
can generate a css file, but I don't know how to make the index.html from
html-webpack-plugin include that yet. I did start looking into that the
other day and decided it was distracting from what I was really trying to
do. I'll probably pick that flag up again later.

Good luck!

On Thu, May 28, 2015 at 1:18 PM, zhon notifications@github.com wrote:

We are not using less. We are probably only using inline styles.

What I am trying to do is include

into my generated index.html file.


Reply to this email directly or view it on GitHub
#3 (comment)
.

@zhon
Copy link
Collaborator Author

zhon commented May 28, 2015

Ah, so it really is hard. Lots of people have this in their webpack config:

module: {
    loaders: commonLoaders.concat([
      { test: /\.css$/, loader: 'style!css' }

It is erroring for me and not telling me what I need to do.

I don't know what style!css is suppose to mean.

https://github.com/micahlmartin/nuts/blob/master/config/webpack.js

as an example.

@zhon
Copy link
Collaborator Author

zhon commented May 28, 2015

The current version of sinon is not compatible with webpack. Unreleased version 2.0 is suppose to be compatible. Will try that next.

Like I always say, javascript is like the wild, wild west.

@zhon
Copy link
Collaborator Author

zhon commented May 28, 2015

Additionally, rewire is broken and doesn't have a solution yet.

jhnns/rewire-webpack#12

@zhon zhon closed this as completed Jun 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants