refactor(cssnano-preset): migrate to TS (#7440)

* refactor(cssnano-preset): migrate to TS

* fix
This commit is contained in:
Joshua Chen 2022-05-17 21:41:30 +08:00 committed by GitHub
parent c8b5f230ab
commit 71b5901bcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 76 additions and 43 deletions

View file

@ -5,12 +5,12 @@
* LICENSE file in the root directory of this source tree.
*/
const path = require('path');
const vfile = require('to-vfile');
const postcss = require('postcss');
const postCssRemoveOverriddenCustomProperties = require('../index');
import path from 'path';
import vfile from 'to-vfile';
import postcss from 'postcss';
import postCssRemoveOverriddenCustomProperties from '../index';
const processFixture = (name) => {
const processFixture = (name: string) => {
const input = vfile.readSync(
path.join(__dirname, '__fixtures__', `${name}.css`),
'utf8',