Skip to content

Commit b40cacc

Browse files
authored
Merge pull request #65 from tailwindcss/split-dist
Create separate dist files for preflight, utilities, and full blown Tailwind
2 parents eced9af + 82f41ff commit b40cacc

15 files changed

+15791
-1171
lines changed

__tests__/fixtures/tailwind-input.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@tailwind preflight;
2+
3+
@tailwind utilities;
4+
5+
@responsive {
6+
.example {
7+
@apply .font-bold;
8+
color: config('colors.red');
9+
}
10+
}

__tests__/sanity.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import tailwind from '../src/index'
77
* Tests
88
*/
99
it('generates the right CSS', () => {
10-
const input = fs.readFileSync(path.resolve(`${__dirname}/../css/tailwind.css`), 'utf8')
10+
const input = fs.readFileSync(path.resolve(`${__dirname}/fixtures/tailwind-input.css`), 'utf8')
1111

1212
return postcss([tailwind()])
1313
.process(input)
1414
.then(result => {
15-
const expected = fs.readFileSync(path.resolve(`${__dirname}/fixtures/tailwind.css`), 'utf8')
15+
const expected = fs.readFileSync(path.resolve(`${__dirname}/fixtures/tailwind-output.css`), 'utf8')
1616

1717
expect(result.css).toBe(expected)
1818
})

css/tailwind.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
@tailwind preflight;
22

33
@tailwind utilities;
4-
5-
@responsive {
6-
.example {
7-
@apply .font-bold;
8-
color: config('colors.red');
9-
}
10-
}

css/utilities.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@tailwind utilities;

0 commit comments

Comments
 (0)