File tree 2 files changed +2
-17
lines changed
2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " postcss-simple-reset" ,
3
- "version" : " 1.0.5 " ,
3
+ "version" : " 1.1.0 " ,
4
4
"description" : " postcss-simple-reset is a postcss plugin to help you to reset your css via at-rules." ,
5
5
"main" : " lib/index.js" ,
6
6
"authors" : [
26
26
"babel-tape-runner" : " ^2.0.1" ,
27
27
"eslint" : " ^2.4.0" ,
28
28
"eslint-plugin-import" : " ^2.7.0" ,
29
- "promise-polyfill" : " ^6.0.2" ,
30
29
"object-assign" : " ^3.0.0" ,
31
30
"tap-spec" : " ^4.1.1" ,
32
31
"tape" : " ^4.5.0" ,
Original file line number Diff line number Diff line change 1
1
import postcss from 'postcss' ;
2
2
import parser from 'postcss-value-parser' ;
3
3
import humps from 'humps' ;
4
- import Promise from 'promise-polyfill' ;
5
4
import resetCore from './reset-core' ;
6
5
7
- if ( typeof window !== 'undefined' ) {
8
- window . Promise = window . Promise || Promise
9
- } else if ( typeof global !== 'undefined' ) {
10
- global . Promise = global . Promise || Promise
11
- }
12
-
13
6
const atRules = {
14
7
global ( platefprm ) {
15
8
return resetCore . resetGlobal ( platefprm ) ;
@@ -74,10 +67,6 @@ const stringifyNode = (node) => {
74
67
}
75
68
}
76
69
77
- const isPromise = ( obj ) => {
78
- return ! ! obj && ( typeof obj === 'object' || typeof obj === 'function' ) && typeof obj . then === 'function' ;
79
- }
80
-
81
70
module . exports = postcss . plugin ( 'postcss-simple-reset' , ( ) => {
82
71
return ( root ) => {
83
72
let promises = [ ] ;
@@ -99,11 +88,8 @@ module.exports = postcss.plugin('postcss-simple-reset', () => {
99
88
} ) ;
100
89
101
90
let promise = ruleFun ( ...params ) ;
91
+ promises . push ( promise ) ;
102
92
103
- if ( isPromise ( promise ) ) {
104
- promises . push ( promise ) ;
105
- }
106
-
107
93
promise . then ( ( resolve ) => {
108
94
if ( typeof resolve === 'object' ) {
109
95
applyRuleSetToNode ( resolve , rule . parent , rule ) ;
You can’t perform that action at this time.
0 commit comments