| | |
| | | } |
| | | |
| | | function writeToExports(customExports, destinations) { |
| | | return Promise.all([].concat(destinations).map( |
| | | /*#__PURE__*/ |
| | | function () { |
| | | return Promise.all([].concat(destinations).map( /*#__PURE__*/function () { |
| | | var _ref = _asyncToGenerator(function* (destination) { |
| | | if (destination instanceof Function) { |
| | | yield destination({ |
| | |
| | | ignoreUnknownVersions: true |
| | | }).some(polyfillBrowser => polyfillBrowser === supportedBrowser))); |
| | | return (root, result) => { |
| | | // polyfills run in execution order |
| | | const majorVersion = parseInt(result.processor.version.split('.')[0]); |
| | | |
| | | if (majorVersion > 7) { |
| | | console.log(''); |
| | | console.log(` |
| | | ┌─────────────────────────────────────────────────────────────────────────────────┐ |
| | | │ │ |
| | | │ This version of postcss-preset-env is not optimised to work with PostCSS 8. │ |
| | | │ Please update to version 7 of PostCSS Preset Env. │ |
| | | │ │ |
| | | │ If you find issues, you can report it at: │ |
| | | │ https://github.com/csstools/postcss-plugins/issues/new/choose │ |
| | | │ │ |
| | | └─────────────────────────────────────────────────────────────────────────────────┘ |
| | | `); |
| | | console.log(''); |
| | | } // polyfills run in execution order |
| | | |
| | | |
| | | const polyfills = supportedFeatures.reduce((promise, feature) => promise.then(() => feature.plugin(result.root, result)), Promise.resolve()).then(() => stagedAutoprefixer(result.root, result)).then(() => { |
| | | if (Object(opts).exportTo) { |
| | | writeToExports(sharedOpts.exportTo, opts.exportTo); |