Skip to content

Commit f193c95

Browse files
committed
Merge pull request usablica#61 from fedosov/master
Makefile (minification)
2 parents 59661ee + b6d7b70 commit f193c95

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

BUILD/BUILD.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env node
2+
3+
var fs = require('fs')
4+
, compressor = require('node-minify')
5+
;
6+
7+
new compressor.minify({
8+
type: 'gcc',
9+
fileIn: '../intro.js',
10+
fileOut: '../minified/intro.min.js',
11+
callback: function(err)
12+
{
13+
if (err)
14+
{
15+
console.log(err);
16+
}
17+
else
18+
{
19+
console.log("JS minified");
20+
}
21+
}
22+
});
23+
24+
new compressor.minify({
25+
type: 'yui-css',
26+
fileIn: '../introjs.css',
27+
fileOut: '../minified/introjs.min.css',
28+
callback: function(err)
29+
{
30+
if (err)
31+
{
32+
console.log(err);
33+
}
34+
else
35+
{
36+
console.log("CSS minified");
37+
}
38+
}
39+
});
40+

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BASE = .
2+
3+
build:
4+
cd BUILD && node BUILD.js
5+
6+
.PHONY: build

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "Intro.js",
3+
"description": "Better introductions for websites and features with a step-by-step guide for your projects",
4+
"version": "0.2.1",
5+
"author": "Afshin Mehrabani <[email protected]>",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/usablica/intro.js"
9+
},
10+
"devDependencies": {
11+
"node-minify": "*"
12+
},
13+
"engine": [
14+
"node >=0.1.90"
15+
],
16+
"main": "intro.js"
17+
}

0 commit comments

Comments
 (0)