Skip to content

Commit f8abd2f

Browse files
committed
Travis: Build and deploy swipebox in the cloud by travis-ci.org
1 parent 25defbe commit f8abd2f

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: node_js
2+
node_js:
3+
- "stable"
4+
before_install:
5+
- cd grunt
6+
- npm install -g grunt-cli
7+
- gem install sass
8+
script:
9+
- grunt travis
10+
deploy:
11+
provider: releases
12+
api-key:
13+
secure: "j2V+piF/EtT+u10+xic31YkxzbkCBEA11uQU640j9lsUQyRXhtxoaDRf/gZaRyG2Bsj7lC5YZ+oAeNQELTTJ2mrm6wibBQfwuIYZSQoeV0MxqYHlZBH7mPVx+p5RGIResJZwqLgwovr4eVSblUxAam19k68CuN0FqCiQtMWzFv8="
14+
file:
15+
- "../deploy/swipebox.zip"
16+
skip_cleanup: true
17+
on:
18+
tags: true
19+
all_branches: true

grunt/gruntfile.js

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,19 @@ module.exports = function(grunt) {
134134
}
135135
},
136136

137-
137+
compress: {
138+
zip: {
139+
options: {
140+
archive: '../deploy/swipebox.zip',
141+
mode: 'zip',
142+
},
143+
files: [
144+
{ expand: true, cwd: '../', src: ['demo/**'] },
145+
{ expand: true, cwd: '../', src: ['lib/**'] },
146+
{ expand: true, cwd: '../', src: ['src/**'] },
147+
]
148+
}
149+
},
138150
} ); // end init config
139151

140152
/**
@@ -150,6 +162,20 @@ module.exports = function(grunt) {
150162
'notify:dist'
151163
] );
152164

165+
166+
/**
167+
* Travis task
168+
*/
169+
grunt.registerTask( 'travis', [
170+
'sass:dist',
171+
'autoprefixer',
172+
'cssmin',
173+
'jshint',
174+
'uglify',
175+
'sass:demo',
176+
'compress'
177+
] );
178+
153179
/**
154180
* Dev task
155181
*
@@ -165,4 +191,4 @@ module.exports = function(grunt) {
165191
'sass:demo',
166192
'watch'
167193
] );
168-
};
194+
};

grunt/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"grunt-contrib-jshint": "~0.10.0",
1717
"grunt-contrib-uglify": "~0.6.0",
1818
"grunt-contrib-watch": "~0.6.1",
19-
"grunt-notify": "~0.3.1"
19+
"grunt-notify": "~0.3.1",
20+
"grunt-contrib-compress": "~0.12.0"
2021
}
2122
}

0 commit comments

Comments
 (0)