Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use original filepath instead of current type for config.searchPath (#…
- Loading branch information
Showing
10 changed files
with
268 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/core/integration-tests/test/integration/tailwind-scss/.postcssrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
plugins: [ | ||
require('tailwindcss')(path.resolve(__dirname, "tailwind.config.js")), | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/core/integration-tests/test/integration/tailwind-scss/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="index.scss"> | ||
</head> | ||
<body class="p-2"> | ||
test | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
packages/core/integration-tests/test/integration/tailwind-scss/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
body { | ||
@apply p-4 m-4; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/core/integration-tests/test/integration/tailwind-scss/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
packages/core/integration-tests/test/integration/tailwind-scss/tailwind.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
content: [path.join(__dirname, "index.html")], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import assert from 'assert'; | ||
import path from 'path'; | ||
import {bundle, outputFS} from '@parcel/test-utils'; | ||
|
||
describe('tailwind', function () { | ||
it('should support tailwind from SCSS', async function () { | ||
let fixture = path.join(__dirname, '/integration/tailwind-scss'); | ||
let b = await bundle(path.join(fixture, 'index.html')); | ||
|
||
let css = await outputFS.readFile( | ||
b.getBundles().find(b => b.type === 'css').filePath, | ||
'utf8', | ||
); | ||
assert(css.includes('.p-2')); | ||
assert(!css.includes('.m-2')); | ||
}); | ||
}); |
Oops, something went wrong.