Skip to content

Commit 84d7603

Browse files
author
mrmrs
committed
Merge branch 'master' of github.com:tachyons-css/tachyons-css.github.io
2 parents 9e5f1e1 + a454073 commit 84d7603

File tree

14 files changed

+2988
-4110
lines changed

14 files changed

+2988
-4110
lines changed

build.js

+3-50
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,3 @@
1-
// dependencies
2-
3-
var fs = require('fs')
4-
var filesize = require('filesize')
5-
var gzipSize = require('gzip-size')
6-
var autoprefixer = require('autoprefixer')
7-
var postcss = require('postcss')
8-
var atImport = require('postcss-import')
9-
var cssvariables = require('postcss-css-variables')
10-
var compressor = require('node-minify')
11-
var conditionals = require('postcss-conditionals')
12-
var cssvariables = require('postcss-css-variables')
13-
var customMedia = require('postcss-custom-media')
14-
15-
var componentsBuild = require('./src/components-build')
16-
17-
// css to be processed
18-
var css = fs.readFileSync('src/css/tachyons.css', 'utf8')
19-
20-
// process css
21-
var output = postcss([
22-
atImport(), cssvariables(), conditionals(), customMedia(), autoprefixer()
23-
]).process(css, {
24-
from: 'src/css/tachyons.css',
25-
to: 'css/tachyons.css'
26-
}).css
27-
28-
// get the original css size
29-
fs.writeFile('css/tachyons.css', output, 'utf-8')
30-
uncompressed = fs.statSync('css/tachyons.css')
31-
var uncompressedSize = uncompressed['size']
32-
var gzippedSRC = gzipSize.sync(output)
33-
console.log('This file starts out at ' + filesize(uncompressedSize) + ' which would be ' + filesize(gzippedSRC))
34-
35-
// minify the css
36-
new compressor.minify({
37-
type: 'sqwish',
38-
fileIn: 'css/tachyons.css',
39-
fileOut: 'css/tachyons.min.css',
40-
callback: function (err, min) {}
41-
})
42-
43-
var minified = fs.statSync('css/tachyons.min.css', 'utf8')
44-
var gzipped = gzipSize.sync(fs.readFileSync('css/tachyons.min.css', 'utf8'))
45-
var minifiedSize = minified['size']
46-
47-
console.log('After minification it is ' + filesize(minifiedSize))
48-
console.log('After gzipping it is ' + filesize(gzipped) + 'instead of ' + filesize(gzipped))
49-
50-
componentsBuild()
1+
require('./src/components-build')()
2+
require('./src/table-of-styles-build')()
3+
require('./src/home-build')()

0 commit comments

Comments
 (0)