Skip to content

Commit 117e4a5

Browse files
committed
Initial commit
0 parents  commit 117e4a5

File tree

193 files changed

+30726
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+30726
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
npm-debug.log
3+
.DS_STORE
4+
*.swp

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
http://tachyons.io

build.js

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
// css to be processed
16+
var css = fs.readFileSync('src/tachyons.css', 'utf8')
17+
18+
// process css
19+
var output = postcss([autoprefixer])
20+
.use(atImport())
21+
.use(cssvariables())
22+
.use(conditionals())
23+
.use(customMedia())
24+
.process(css, {
25+
from: 'src/tachyons.css',
26+
to: 'css/tachyons.css'
27+
})
28+
.css
29+
30+
// get the original css size
31+
fs.writeFile('css/tachyons.css', output, 'utf-8')
32+
uncompressed = fs.statSync('css/tachyons.css')
33+
var uncompressedSize = uncompressed['size']
34+
var gzippedSRC = gzipSize.sync(output)
35+
console.log('This file starts out at ' + filesize(uncompressedSize) + ' which would be ' + filesize(gzippedSRC))
36+
37+
// minify the css
38+
new compressor.minify({
39+
type: 'sqwish',
40+
fileIn: 'css/tachyons.css',
41+
fileOut: 'css/tachyons.min.css',
42+
callback: function (err, min) {
43+
}
44+
})
45+
46+
var minified = fs.statSync('css/tachyons.min.css', 'utf8')
47+
var gzipped = gzipSize.sync(fs.readFileSync('css/tachyons.min.css', 'utf8'))
48+
var minifiedSize = minified['size']
49+
50+
console.log('After minification it is ' + filesize(minifiedSize))
51+
console.log('After gzipping it is ' + filesize(gzipped) + 'instead of ' + filesize(gzipped))

css/bootstrap.min.css

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)