Skip to content

Commit 87b1d64

Browse files
committed
Moved from less to postcss
1 parent ab1b496 commit 87b1d64

19 files changed

+31
-22
lines changed

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
"fs": "0.0.2",
3333
"html-loader": "^0.4.3",
3434
"html-webpack-plugin": "^2.10.0",
35-
"less": "^2.6.1",
36-
"less-loader": "^2.2.2",
35+
"postcss": "^5.0.19",
36+
"postcss-cssnext": "^2.5.1",
37+
"postcss-csso": "^1.0.0",
38+
"postcss-loader": "^0.8.2",
3739
"style-loader": "^0.13.0",
3840
"svg-sprite-loader": "0.0.18",
3941
"url-loader": "^0.5.7",

src/app/app.less src/app/app.css

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ input, button, select, textarea {
8282
}
8383
}
8484

85-
//TODO refactor buttons
85+
/*TODO refactor buttons*/
8686
.btn {
8787
background-color: transparent;
8888
color: #556473;
@@ -100,7 +100,7 @@ input, button, select, textarea {
100100
padding: 0;
101101
vertical-align: middle;
102102

103-
.icon {
103+
& .icon {
104104
width: 20px;
105105
height: 20px;
106106
}
@@ -114,11 +114,11 @@ input, button, select, textarea {
114114

115115
&:hover {
116116
border-color: darken(#15cc35, 10%);
117-
.icon {
117+
& .icon {
118118
fill: darken(#15cc35, 10%);
119119
}
120120
}
121-
.icon {
121+
& .icon {
122122
fill: #15cc35
123123
}
124124
}
@@ -130,11 +130,11 @@ input, button, select, textarea {
130130
color: #22b8eb;
131131
&:hover {
132132
border-color: darken(#22b8eb, 10%);
133-
.icon {
133+
& .icon {
134134
fill: darken(#22b8eb, 10%);
135135
}
136136
}
137-
.icon {
137+
& .icon {
138138
fill: #22b8eb
139139
}
140140
}

src/app/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import './app.less';
1+
import './app.css';
22
import 'images/app-icon.svg';
33

44
import angular from 'angular';
File renamed without changes.

src/app/list/list-form/list-form.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import './list-form.less';
3+
import './list-form.css';
44
import angular from 'angular';
55
import listForm from './list-form.component';
66
import googleTranslate from 'common/google-translate/google-translate.service';
File renamed without changes.

src/app/list/list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import './list.less';
3+
import './list.css';
44
import angular from 'angular';
55
import ListController from './list.ctrl';
66
import listService from './list.service';

src/app/list/timer-input/timer-input.less src/app/list/timer-input/timer-input.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
border: 1px solid #129ac8;
1717
}
1818
}
19-
input {
19+
& input {
2020
padding-right: 0;
2121
width: 40px;
2222
padding-left: 41px;

src/app/list/timer-input/timer-input.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import './timer-input.less'
3+
import './timer-input.css'
44
import angular from 'angular';
55
import timer from 'common/timer/timer.service';
66
import timerInput from './timer-input.component';

src/app/sidebar/header/sidebar-header.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
import 'svg/plus.svg'
4-
import './sidebar-header.less';
4+
import './sidebar-header.css';
55

66
import angular from 'angular';
77
import sidebarHeader from './sidebar-header.component';

src/app/sidebar/list/sidebar-list.less src/app/sidebar/list/sidebar-list.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
right: 15px;
5353
top: 10px;
5454

55-
.btn-collection {
55+
& .btn-collection {
5656
width: 26px;
5757
height: 26px;
5858
box-sizing: border-box;
@@ -77,14 +77,14 @@
7777
}
7878

7979
&:hover &__action {
80-
.btn-collection {
80+
& .btn-collection {
8181
opacity: 1;
8282
visibility: visible;
8383
}
8484
}
8585

8686
&--active &__action {
87-
.btn-collection {
87+
& .btn-collection {
8888
border: 1px solid white;
8989
&__icon {
9090
fill: #fff;

src/app/sidebar/list/sidebar-list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
import 'svg/close.svg';
4-
import './sidebar-list.less';
4+
import './sidebar-list.css';
55

66
import angular from 'angular';
77
import sidebarList from './sidebar-list.component';
File renamed without changes.

src/app/sidebar/sidebar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import './sidebar.less';
3+
import './sidebar.css';
44
import angular from 'angular';
55
import SidebarController from './sidebar.ctrl';
66
import windowControls from './window-controls/window-controls';

src/app/sidebar/window-controls/window-controls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
import './window-controls.less';
3+
import './window-controls.css';
44
import angular from 'angular';
55

66
import windowControls from './window-controls.component';

src/main.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
/* eslint-env node */
23

34
const app = require('app');
45
const BrowserWindow = require('browser-window');

webpack.config.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
/* eslint-env node */
23

34
const path = require('path');
45

@@ -7,7 +8,8 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
78
const HtmlWebpackPlugin = require('html-webpack-plugin');
89
const CopyWebpackPlugin = require('copy-webpack-plugin');
910
const ExtractTextPlugin = require('extract-text-webpack-plugin');
10-
11+
const cssnext = require('postcss-cssnext');
12+
const csso = require('postcss-csso');
1113
const ENV = process.env.NODE_ENV || 'dev';
1214
const isProd = ENV === 'production';
1315

@@ -99,7 +101,7 @@ const config = {
99101
},
100102
{
101103
test: /\.(less|css)$/,
102-
loader: ExtractTextPlugin.extract('style-loader', 'css?root=~images&sourceMap!less?sourceMap')
104+
loader: ExtractTextPlugin.extract('style-loader', 'css?root=~images&sourceMap!postcss?sourceMap')
103105
},
104106
{
105107
test: /\.svg$/,
@@ -109,6 +111,10 @@ const config = {
109111
})}`
110112
}
111113
]
114+
},
115+
116+
postcss: () => {
117+
return [cssnext, csso];
112118
}
113119
};
114120

0 commit comments

Comments
 (0)