Skip to content

Commit

Permalink
Merge pull request #240 from msssk/update-build-config
Browse files Browse the repository at this point in the history
Update build config
  • Loading branch information
msssk authored Apr 16, 2020
2 parents e59daa3 + 3847f6e commit b4b6d7c
Showing 1 changed file with 40 additions and 28 deletions.
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)\/)/ ]
]
};
})();

0 comments on commit b4b6d7c

Please sign in to comment.