Skip to content

Commit

Permalink
Move to webpack css-loader (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbuck authored Oct 5, 2017
1 parent d8683cb commit 3a5a798
Show file tree
Hide file tree
Showing 9 changed files with 617 additions and 28 deletions.
3 changes: 0 additions & 3 deletions assets/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
"js": [
"app.js"
],
"css": [
"style.css"
],
"run_at": "document_idle",
"all_frames": false
}
Expand Down
3 changes: 0 additions & 3 deletions assets/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<head>
<meta charset="UTF-8">
<title></title>
<link href="core.css" media="all" rel="stylesheet" />
<link href="form.css" media="all" rel="stylesheet" />
<link href="options.css" media="all" rel="stylesheet" />
</head>
<body>
<div id="options"></div>
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions lib/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'core-js/fn/object/entries';
import OctoLinker from './octo-linker.js';
import * as storage from './options/storage.js';
import './app.css';

storage.load().then(() => {
const octoLinker = new OctoLinker();
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions lib/options/page.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import 'primer-core/build/build.css';
import 'primer-forms/build/build.css';
import './options.css';

import components from './components';
import * as storage from './storage';
import { options } from './options';
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"chrome-promise": "^2.1.1",
"concat-map": "^0.0.1",
"core-js": "^2.5.1",
"css-loader": "^0.28.7",
"escape-regex-string": "^1.0.4",
"findandreplacedomtext": "^0.4.5",
"github-injection": "^1.0.1",
Expand All @@ -73,6 +74,7 @@
"querystring": "^0.2.0",
"semver": "^5.4.1",
"semver-regex": "^1.0.0",
"style-loader": "^0.19.0",
"uuid": "^3.1.0",
"xregexp": "^3.2.0"
},
Expand Down
12 changes: 6 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ module.exports = {
], {
ignore: ['manifest.json'],
}),
new CopyWebpackPlugin([
{ from: 'node_modules/primer-core/build/', to: 'core.css' },
{ from: 'node_modules/primer-forms/build/', to: 'form.css' },
]),
],
module: {
loaders: [
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.js$/,
exclude: /(node_modules)/,
loader: 'babel-loader',
use: 'babel-loader',
},
],
},
Expand Down
Loading

0 comments on commit 3a5a798

Please sign in to comment.