summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-02-08 15:24:30 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-02-08 15:24:30 +0000
commita76a93169841ec78f08b973aa17eea9fcf982feb (patch)
tree1e506652d7e93b4c35b75a17abac9d46b477f882
parent00b000a050d60e9b13ac85d6bd73fd84d5ffcf87 (diff)
downloadmullvadvpn-a76a93169841ec78f08b973aa17eea9fcf982feb.tar.xz
mullvadvpn-a76a93169841ec78f08b973aa17eea9fcf982feb.zip
Strip out CSS modules since babel plugin does not work as intended
See https://trello.com/c/i9ntPAl9/10-add-css-modules
-rw-r--r--.babelrc6
-rw-r--r--app/assets/style.css2
-rw-r--r--app/components/LoggedIn.css3
-rw-r--r--app/components/LoggedIn.js2
-rw-r--r--app/components/Login.css2
-rw-r--r--app/components/Login.js3
-rw-r--r--app/index.html2
-rw-r--r--package.json1
8 files changed, 10 insertions, 11 deletions
diff --git a/.babelrc b/.babelrc
index 8e0f7e6842..0b7f2e0edb 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,8 +1,4 @@
{
"presets": ["es2015", "stage-0", "react"],
- "plugins": ["transform-decorators-legacy", "transform-runtime", [
- "css-modules-transform", {
- "extractCss": "./build/assets/stylesheets.css"
- }
- ]]
+ "plugins": ["transform-decorators-legacy", "transform-runtime"]
}
diff --git a/app/assets/style.css b/app/assets/style.css
new file mode 100644
index 0000000000..5214062738
--- /dev/null
+++ b/app/assets/style.css
@@ -0,0 +1,2 @@
+@import '../components/Login.css';
+@import '../components/LoggedIn.css';
diff --git a/app/components/LoggedIn.css b/app/components/LoggedIn.css
new file mode 100644
index 0000000000..a289e6067d
--- /dev/null
+++ b/app/components/LoggedIn.css
@@ -0,0 +1,3 @@
+.loggedin__container {
+ border: 1px solid black;
+} \ No newline at end of file
diff --git a/app/components/LoggedIn.js b/app/components/LoggedIn.js
index 50521d5f6a..c99f289c48 100644
--- a/app/components/LoggedIn.js
+++ b/app/components/LoggedIn.js
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
export default class LoggedIn extends Component {
render() {
return (
- <div>
+ <div className="loggedin__container">
<h2>Logged in as {this.props.user.username}</h2>
</div>
);
diff --git a/app/components/Login.css b/app/components/Login.css
index b59a5dbc86..362abac556 100644
--- a/app/components/Login.css
+++ b/app/components/Login.css
@@ -1,3 +1,3 @@
-.container {
+.login__container {
border: 1px solid green;
} \ No newline at end of file
diff --git a/app/components/Login.js b/app/components/Login.js
index d2cea86b42..ec822a4f2b 100644
--- a/app/components/Login.js
+++ b/app/components/Login.js
@@ -1,5 +1,4 @@
import React, { Component, PropTypes } from 'react';
-import styles from './Login.css';
export default class Login extends Component {
static propTypes = {
@@ -17,7 +16,7 @@ export default class Login extends Component {
render() {
return (
- <div className={styles.container}>
+ <div className="login__container">
<h2>Login</h2>
<input ref="username" type="text" />
<button onClick={::this.handleLogin}>Log In</button>
diff --git a/app/index.html b/app/index.html
index afe6566ca5..684fdc8517 100644
--- a/app/index.html
+++ b/app/index.html
@@ -2,7 +2,7 @@
<html>
<head>
<title>My App</title>
- <link rel="stylesheet" href="./assets/stylesheets.css" />
+ <link rel="stylesheet" href="./assets/style.css" />
</head>
<body>
<div id="app"></div>
diff --git a/package.json b/package.json
index 4a6324d053..7ac69b3be2 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,6 @@
"babel-cli": "^6.22.2",
"babel-core": "^6.2.1",
"babel-eslint": "^7.1.1",
- "babel-plugin-css-modules-transform": "^1.2.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-es2015": "^6.1.18",