From c1f62d72aee88a8c25b7bc0961a82b1bab33a610 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 10 Feb 2013 01:14:49 -0800 Subject: [PATCH] Ensure the `csp` build is an alias of the `mobile`. Former-commit-id: defb0a7d28cb3ff9d799dcbaceef3175f78531e9 --- build.js | 4 ++-- test/test-build.js | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 3506c072d..0c8ff1603 100755 --- a/build.js +++ b/build.js @@ -1390,10 +1390,10 @@ var isMinify = options.indexOf('-m') > -1 || options.indexOf('--minify') > -1; // flag to specify a mobile build - var isMobile = options.indexOf('mobile') > -1; + var isMobile = isCSP || options.indexOf('mobile') > -1; // flag to specify a modern build - var isModern = isCSP || isMobile || options.indexOf('modern') > -1; + var isModern = isMobile || options.indexOf('modern') > -1; // flag to specify a modularize build var isModularize = options.indexOf('modularize') > -1; diff --git a/test/test-build.js b/test/test-build.js index 8b7b141d2..24caba685 100644 --- a/test/test-build.js +++ b/test/test-build.js @@ -1093,6 +1093,24 @@ start(); }); }); + + asyncTest('`lodash csp`', function() { + var sources = []; + + var check = _.after(2, _.once(function() { + equal(sources[0], sources[1]); + QUnit.start(); + })); + + var callback = function(data) { + // remove copyright header and append source + sources.push(data.source.replace(/^\/\**[\s\S]+?\*\/\n/, '')); + check(); + }; + + build(['-s', '-d', 'csp'], callback); + build(['-s', '-d', 'mobile'], callback); + }); }()); /*--------------------------------------------------------------------------*/