Don't add sinon to static/vendor

Doing this slows down build process. Sinon should go to
static/tests. Also don't include tests in build process.

Closes-Bug: #1486096

Change-Id: I696fa4e219bcb23e3fddf59d3e1ac4f10e7c925f
This commit is contained in:
Vitaly Kramskikh 2015-08-18 17:36:06 +03:00
parent 50bd5cf534
commit cab4f9245d
3 changed files with 10 additions and 4 deletions

View File

@ -14,7 +14,7 @@
* under the License.
**/
//jshint strict:false
/*eslint-disable strict*/
var argv = require('minimist')(process.argv.slice(2));
@ -79,6 +79,10 @@ var jsFilter = filter('**/*.js');
var jsxFilter = filter('**/*.jsx');
var lessFilter = filter('**/*.less');
var indexFilter = filter('index.html');
var buildSourceFilter = filter([
'**',
'!tests/**'
]);
var buildResultFilter = filter([
'index.html',
'main.js',
@ -103,7 +107,7 @@ gulp.task('bower:fetch', bower);
gulp.task('bower:copy-main', function() {
var dirs = [
{dirName: 'static/vendor/bower', includeDev: 'inclusive'},
{dirName: 'static/vendor/bower', includeDev: false},
{dirName: 'static/tests/bower', includeDev: 'exclusive'}
];
var streams = dirs.map(function(dir) {
@ -291,6 +295,7 @@ gulp.task('rjs', function() {
.pipe(indexFilter)
.pipe(replace('__CACHE_BUST__', Date.now()))
.pipe(indexFilter.restore())
.pipe(buildSourceFilter)
.pipe(intermediate({output: '_build'}, function(tempDir, cb) {
var configFile = path.join(tempDir, 'build.json');
rjsConfig.appDir = tempDir;

View File

@ -40,8 +40,7 @@ define(function() {
i18next: 'vendor/bower/i18next/release/i18next-1.7.1',
deepModel: 'vendor/custom/deep-model',
lessLibrary: 'vendor/bower/less/dist/less',
'require-css': 'vendor/bower/require-css',
sinon: 'vendor/bower/sinon/lib/sinon'
'require-css': 'vendor/bower/require-css'
},
shim: {
'expression/parser': {

View File

@ -20,6 +20,8 @@ define(['config'], function(config) {
config.baseUrl = '';
config.waitSeconds = 7;
config.paths.sinon = 'tests/bower/sinon/lib/sinon';
return {
proxyPort: 9057,
proxyUrl: 'http://localhost:9057/',