mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-01-12 22:45:52 +08:00
chore: clean up angularFiles.js
This commit is contained in:
59
angularFiles.js
vendored
59
angularFiles.js
vendored
@@ -114,7 +114,7 @@ angularFiles = {
|
||||
'test/ngMobile/**/*.js'
|
||||
],
|
||||
|
||||
'jstd': [
|
||||
'karma': [
|
||||
'components/jquery/jquery.js',
|
||||
'test/jquery_remove.js',
|
||||
'@angularSrc',
|
||||
@@ -126,18 +126,18 @@ angularFiles = {
|
||||
'example/personalLog/test/*.js'
|
||||
],
|
||||
|
||||
'jstdExclude': [
|
||||
'karmaExclude': [
|
||||
'test/jquery_alias.js',
|
||||
'src/angular-bootstrap.js',
|
||||
'src/ngScenario/angular-bootstrap.js'
|
||||
],
|
||||
|
||||
'jstdScenario': [
|
||||
'karmaScenario': [
|
||||
'build/angular-scenario.js',
|
||||
'build/docs/docs-scenario.js'
|
||||
],
|
||||
|
||||
"jstdModules": [
|
||||
"karmaModules": [
|
||||
'build/angular.js',
|
||||
'@angularSrcModules',
|
||||
'src/ngScenario/browserTrigger.js',
|
||||
@@ -151,21 +151,7 @@ angularFiles = {
|
||||
'test/ngMobile/**/*.js'
|
||||
],
|
||||
|
||||
'jstdPerf': [
|
||||
'@angularSrc',
|
||||
'@angularSrcModules',
|
||||
'src/ngMock/angular-mocks.js',
|
||||
'perf/data/*.js',
|
||||
'perf/testUtils.js',
|
||||
'perf/*.js'
|
||||
],
|
||||
|
||||
'jstdPerfExclude': [
|
||||
'src/ng/angular-bootstrap.js',
|
||||
'src/ngScenario/angular-bootstrap.js'
|
||||
],
|
||||
|
||||
'jstdJquery': [
|
||||
'karmaJquery': [
|
||||
'components/jquery/jquery.js',
|
||||
'test/jquery_alias.js',
|
||||
'@angularSrc',
|
||||
@@ -178,7 +164,7 @@ angularFiles = {
|
||||
'example/personalLog/test/*.js'
|
||||
],
|
||||
|
||||
'jstdJqueryExclude': [
|
||||
'karmaJqueryExclude': [
|
||||
'src/angular-bootstrap.js',
|
||||
'src/ngScenario/angular-bootstrap.js',
|
||||
'test/jquery_remove.js'
|
||||
@@ -186,29 +172,22 @@ angularFiles = {
|
||||
};
|
||||
|
||||
if (exports) {
|
||||
exports.files = angularFiles
|
||||
exports.mergeFiles = function mergeFiles() {
|
||||
exports.files = angularFiles;
|
||||
exports.mergeFilesFor = function() {
|
||||
var files = [];
|
||||
|
||||
[].splice.call(arguments, 0).forEach(function(file) {
|
||||
if (file.match(/karma/)) {
|
||||
files.push(file);
|
||||
} else {
|
||||
angularFiles[file].forEach(function(f) {
|
||||
// replace @ref
|
||||
var match = f.match(/^\@(.*)/);
|
||||
if (match) {
|
||||
var deps = angularFiles[match[1]];
|
||||
files = files.concat(deps);
|
||||
} else {
|
||||
if (!/jstd|jasmine/.test(f)) { //TODO(i): remove once we don't have jstd/jasmine in repo
|
||||
files.push(f);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
Array.prototype.slice.call(arguments, 0).forEach(function(filegroup) {
|
||||
angularFiles[filegroup].forEach(function(file) {
|
||||
// replace @ref
|
||||
var match = file.match(/^\@(.*)/);
|
||||
if (match) {
|
||||
files = files.concat(angularFiles[match[1]]);
|
||||
} else {
|
||||
files.push(file);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return files;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ module.exports = function(config) {
|
||||
sharedConfig(config);
|
||||
|
||||
config.set({
|
||||
files: angularFiles.mergeFiles('jstd'),
|
||||
exclude: angularFiles.files.jstdExclude,
|
||||
files: angularFiles.mergeFilesFor('karma'),
|
||||
exclude: angularFiles.mergeFilesFor('karmaExclude'),
|
||||
|
||||
junitReporter: {
|
||||
outputFile: 'test_out/jqlite.xml',
|
||||
|
||||
@@ -5,8 +5,8 @@ module.exports = function(config) {
|
||||
sharedConfig(config);
|
||||
|
||||
config.set({
|
||||
files: angularFiles.mergeFiles('jstdJquery'),
|
||||
exclude: angularFiles.files.jstdJqueryExclude,
|
||||
files: angularFiles.mergeFilesFor('karmaJquery'),
|
||||
exclude: angularFiles.mergeFilesFor('karmaJqueryExclude'),
|
||||
|
||||
junitReporter: {
|
||||
outputFile: 'test_out/jquery.xml',
|
||||
|
||||
@@ -5,7 +5,7 @@ module.exports = function(config) {
|
||||
sharedConfig(config);
|
||||
|
||||
config.set({
|
||||
files: angularFiles.mergeFiles('jstdModules', 'angularSrcModules'),
|
||||
files: angularFiles.mergeFilesFor('karmaModules', 'angularSrcModules'),
|
||||
|
||||
junitReporter: {
|
||||
outputFile: 'test_out/modules.xml',
|
||||
|
||||
Reference in New Issue
Block a user