From 215c423db692f14e343b854dceda3f87f5e9c761 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 3 Jan 2022 02:57:02 +0800 Subject: [PATCH] chore(deps): Upgrade dependency postcss to v8 Error: true is not a PostCSS plugin https://github.com/kktjs/kkt/issues/324 --- package.json | 10 ++++++---- test/compile.test.ts | 10 ++++++++++ test/src/markdown.less | 2 ++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6d95afe2..a2eae9a0 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "watch": "tsbb watch --disable-babel --no-esm", "build": "tsbb build --disable-babel --no-esm", "test": "npm run build && tsbb test", - "coverage": "tsbb test --coverage", + "coverage": "npm run build && tsbb test --coverage", "example:test": "node ./lib/index.js -d test/src -o test/out", "example:test:watch": "node ./lib/index.js -d test/src -o test/out --combine test/out/dist.css --watch", "example:test:watch2": "node ./lib/index.js -d test/src -o test/out --watch --exclude-css" @@ -38,16 +38,18 @@ "src" ], "devDependencies": { - "tsbb": "3.4.4" + "tsbb": "3.5.4" }, "dependencies": { "@types/fs-extra": "9.0.13", "@types/less": "3.0.3", "@types/minimist": "1.2.2", - "@types/node": "16.7.8", + "@types/node": "17.0.6", + "autoprefixer": "10.4.1", "chokidar": "3.5.2", - "directory-tree": "3.0.0", + "directory-tree": "3.0.1", "fs-extra": "10.0.0", + "postcss": "8.4.5", "read-pkg-up": "7.0.1", "less": "4.1.2", "less-plugin-autoprefix": "2.0.0", diff --git a/test/compile.test.ts b/test/compile.test.ts index 7d8ffdcc..61b2f4cc 100644 --- a/test/compile.test.ts +++ b/test/compile.test.ts @@ -21,6 +21,16 @@ it('compile = rmGlobal test case', async () => { expect(dist.indexOf(':global .a div') === -1).toBeTruthy(); }); +it('autoprefix test case', async () => { + await compile('test/src', { + out: 'test/out', + combine: 'test/out/dist.css', + rmGlobal: true, + }); + const dist = await fs.readFile('test/out/dist.css'); + expect(dist.indexOf('-webkit-user-select') > -1).toBeTruthy(); +}); + it('Folder undefined test case', async () => { console.log = jest.fn(); await compile('test/srcs', { diff --git a/test/src/markdown.less b/test/src/markdown.less index 31417b12..5dc5b7ad 100644 --- a/test/src/markdown.less +++ b/test/src/markdown.less @@ -21,6 +21,8 @@ nav ul { } .inline { color: red; + display: flex; + user-select: none; } .foo {