Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build config #240

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 40 additions & 28 deletions package.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,47 @@
var miniExcludes = {
// jshint unused: false
var profile = (function () {
var miniExcludes = {
'dstore/README.md': 1,
'dstore/package': 1
},
isTestRe = /\/test\//;
};
var amdRegex = /\.js$/;
var isRqlRegex = /RqlQuery\.js/;
var isTestRegex = /\/tests\//;
var miniExcludeRegex = /\/(?:tests|demos|docs)\//;
var packages = {};

var packages = {};
try {
// retrieve the set of packages for determining which modules to include
require(['util/build/buildControl'], function (buildControl) {
packages = buildControl.packages;
});
} catch (error) {
console.error('Unable to retrieve packages for determining optional package support in dstore');
}
var profile = {
resourceTags: {
test: function (filename, mid) {
return isTestRe.test(filename);
},
try {
// retrieve the set of packages for determining which modules to include
require([ 'util/build/buildControl' ], function (buildControl) {
packages = buildControl.packages;
});
}
catch (error) {
console.error('Unable to retrieve packages for determining optional package support in dstore');
}

miniExclude: function (filename, mid) {
return /\/(?:tests|demos|docs)\//.test(filename) || mid in miniExcludes;
},
return {
resourceTags: {
test: function (filename) {
return isTestRegex.test(filename);
},

amd: function (filename, mid) {
return /\.js$/.test(filename);
miniExclude: function (filename, mid) {
return miniExcludeRegex.test(filename) || mid in miniExcludes;
},

amd: function (filename) {
return amdRegex.test(filename);
},

copyOnly: function (filename) {
// conditionally omit modules dependent on rql packages
return isTestRegex.test(filename) || (!packages.rql && isRqlRegex.test(filename));
}
},

copyOnly: function (filename, mid) {
// conditionally omit modules dependent on rql packages
return (!packages['rql'] && /RqlQuery\.js/.test(filename));
}
}
};
trees: [
[ '.', '.', /(?:\/\.)|(?:~$)|(?:(?:html-report|node_modules)\/)/ ]
]
};
})();