Skip to content

Commit

Permalink
chore(deps): Upgrade dependency postcss to v8
Browse files Browse the repository at this point in the history
Error: true is not a PostCSS plugin
kktjs/kkt#324
  • Loading branch information
jaywcjlove committed Jan 2, 2022
1 parent 0b337ca commit 215c423
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions test/compile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
2 changes: 2 additions & 0 deletions test/src/markdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ nav ul {
}
.inline {
color: red;
display: flex;
user-select: none;
}

.foo {
Expand Down

0 comments on commit 215c423

Please sign in to comment.