Skip to content

Commit 2b22d72

Browse files
committed
Generate experimental build for CDN
1 parent 092009b commit 2b22d72

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/build.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ import postcss from 'postcss'
33
import tailwind from '..'
44
import CleanCSS from 'clean-css'
55

6-
function buildDistFile(filename) {
6+
function buildDistFile(filename, config = {}, outFilename = filename) {
77
return new Promise((resolve, reject) => {
88
console.log(`Processing ./${filename}.css...`)
99

1010
fs.readFile(`./${filename}.css`, (err, css) => {
1111
if (err) throw err
1212

13-
return postcss([tailwind(), require('autoprefixer')])
13+
return postcss([tailwind(config), require('autoprefixer')])
1414
.process(css, {
1515
from: `./${filename}.css`,
16-
to: `./dist/${filename}.css`,
16+
to: `./dist/${outFilename}.css`,
1717
})
1818
.then(result => {
19-
fs.writeFileSync(`./dist/${filename}.css`, result.css)
19+
fs.writeFileSync(`./dist/${outFilename}.css`, result.css)
2020
return result
2121
})
2222
.then(result => {
2323
const minified = new CleanCSS().minify(result.css)
24-
fs.writeFileSync(`./dist/${filename}.min.css`, minified.styles)
24+
fs.writeFileSync(`./dist/${outFilename}.min.css`, minified.styles)
2525
})
2626
.then(resolve)
2727
.catch(error => {
@@ -39,6 +39,7 @@ Promise.all([
3939
buildDistFile('components'),
4040
buildDistFile('utilities'),
4141
buildDistFile('tailwind'),
42+
buildDistFile('tailwind', { future: 'all', experimental: 'all' }, 'tailwind-experimental'),
4243
]).then(() => {
4344
console.log('Finished Building Tailwind!')
4445
})

0 commit comments

Comments
 (0)