Skip to content

Commit ae3f39d

Browse files
committed
Adds raw html table of styles generated from src
Note that this also removes the processing of the CSS in the build script since that is now handled in the tachyons-cli script (npm run css).
1 parent 9341589 commit ae3f39d

File tree

7 files changed

+899
-629
lines changed

7 files changed

+899
-629
lines changed

build.js

+2-47
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,5 @@
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-
151
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))
2+
var tableOfStylesBuild = require('./src/table-of-styles-build')
493

504
componentsBuild()
5+
tableOfStylesBuild()

docs/table-of-styles/index.html

+167
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)