Skip to content

Commit c006f02

Browse files
committed
Redo build pipeline to more cleanly minify, add AMD/CJS modules.
1 parent 1b25e5c commit c006f02

10 files changed

+163
-28
lines changed

Gruntfile.js

+40-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,53 @@ module.exports = function(grunt) {
33
uglify: {
44
options: {
55
report: 'gzip',
6-
sourceMap: true,
76
preserveComments: 'some',
8-
wrap: 'Talker'
7+
compress: {
8+
pure_getters: true
9+
}
910
},
10-
dist: {
11+
globals: {
12+
options: {
13+
banner: '(function(){',
14+
footer: '\nwindow.Talker=Talker})()'
15+
},
1116
files: {
1217
'dist/talker.min.js': [
1318
'src/talker.js'
1419
]
1520
}
21+
},
22+
amd: {
23+
options: {
24+
banner: 'define([],function(){',
25+
footer: '\nreturn Talker})'
26+
},
27+
files: {
28+
'dist/amd/talker.min.js': [
29+
'src/talker.js'
30+
]
31+
}
32+
},
33+
named_amd: {
34+
options: {
35+
banner: 'define("talker",[],function(){',
36+
footer: '\nreturn Talker})'
37+
},
38+
files: {
39+
'dist/named_amd/talker.min.js': [
40+
'src/talker.js'
41+
]
42+
}
43+
},
44+
common_js: {
45+
options: {
46+
footer: '\nmodule.exports=Talker'
47+
},
48+
files: {
49+
'dist/common_js/talker.min.js': [
50+
'src/talker.js'
51+
]
52+
}
1653
}
1754
}
1855
});

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
talker.js
22
=========
33

4-
A tiny (under 4kB), promise-based library for cross-origin communication between frames and windows.
4+
A tiny (<4kB minified, <1kB min+gzip), promise-based library for cross-origin communication between frames and windows.
55

66
Building
77
--------

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "talker.js",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"homepage": "https://github.com/secondstreet/talker.js",
55
"author": "Second Street <[email protected]>",
66
"description": "A tiny, promise-based library for cross-origin communication between frames and windows.",

dist/amd/talker.min.js

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

dist/common_js/talker.min.js

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

dist/named_amd/talker.min.js

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

0 commit comments

Comments
 (0)