Skip to content

Commit

Permalink
WA环境:调整 gulp usemin 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
amio committed Mar 6, 2014
1 parent ea93429 commit b2c45d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
13 changes: 1 addition & 12 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>Protoshop - 携程无线</title>
<meta name="viewport" content="width=device-width" />
<!-- build:css(.tmp) styles/main.css -->
<!-- build:css styles/main.css -->
<link rel="stylesheet" href="styles/main.css" />
<link rel="stylesheet" href="styles/font.css" />
<!-- endbuild -->
Expand Down Expand Up @@ -41,16 +41,5 @@
<script src="scripts/controllers/package-edit.js"></script>
<!-- endbuild -->

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-48582044-2', 'ctripcorp.com');
ga('send', 'pageview');

</script>

</body>
</html>
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ var rev = require('gulp-rev');
gulp.task('usemin', function () {
gulp.src('./app/*.html')
.pipe(usemin({
css: [minifycss(), 'concat', rev()],
html: [minifyhtml({empty: true})],
js: [uglify(), rev()]
css: [minifycss(), rev()],
js: [uglify(), rev()],
html: [minifyhtml({empty: true})]
}))
.pipe(gulp.dest(BUILD_ROOT));
});
Expand Down Expand Up @@ -136,7 +136,7 @@ gulp.task('dist', function () {
beta: '[email protected]:/usr/local/httpd/htdocs/beta/html/'
};
var rsyncParams = ' -avz -e ssh --delete --exclude=.git* --exclude=*.scss --exclude=node_modules';

sh('rsync ' + BUILD_ROOT + '/ ' + target.beta + rsyncParams);
});

Expand Down

0 comments on commit b2c45d9

Please sign in to comment.