Created
July 24, 2014 11:18
-
-
Save nim23/5781017fac6fea5c66ab to your computer and use it in GitHub Desktop.
Componenty Library Auto Copy Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Watch tasks that looks for changes in files and automatically copies them | |
over to BridgeIT, DesginLanguage and LatestBuild. | |
Handy when making small tweaks in css and js files saves the headache of copying | |
them to each location. | |
Will have to be used from the command line with gulp run-watch command. | |
Isn't used by the component library solution build process. | |
*/ | |
var DESIGN_LANGAUAGE_PATH = '../../../DesignLanguage/WebApp/DesignLanguage'; | |
var LATEST_BUILD_PATH = '../../../LatestBuild/ComponentLibrary'; | |
var BRIDGEIT_PATH = '../../../BridgeIT/WebApp/BridgeIT.Web.Client'; | |
gulp.task('copy-js', ['lint', 'scripts'], function() { | |
gulp.src('js/ComponentLibrary-1.0.0.js') | |
.pipe(gulp.dest(BRIDGEIT_PATH + '/Scripts')) | |
.pipe(gulp.dest(LATEST_BUILD_PATH + '/js')) | |
.pipe(gulp.dest(DESIGN_LANGAUAGE_PATH + '/Scripts/component')); | |
gulp.src('js/ComponentLibrary-1.0.0.min.js') | |
.pipe(gulp.dest(BRIDGEIT_PATH + '/Scripts')) | |
.pipe(gulp.dest(LATEST_BUILD_PATH + '/js')) | |
.pipe(gulp.dest(DESIGN_LANGAUAGE_PATH + '/Scripts/component')); | |
}); | |
gulp.task('copy-sass', ['sass'],function() { | |
gulp.src('stylesheets/ComponentLibrary-1.0.0.css') | |
.pipe(gulp.dest(BRIDGEIT_PATH + '/Content/stylesheets')) | |
.pipe(gulp.dest(LATEST_BUILD_PATH + '/stylesheets')) | |
.pipe(gulp.dest(DESIGN_LANGAUAGE_PATH + '/Content/stylesheets')); | |
}); | |
gulp.task('watch-js', function() { | |
gulp.watch(['js/controls/*.js', 'js/modules/*.js'], ['copy-js']); | |
}); | |
gulp.task('watch-sass', function() { | |
gulp.watch('sass/**/*.scss', ['copy-sass']); | |
}); | |
gulp.task('run-watch', ['watch-sass', 'watch-js']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment