Skip to content

Commit

Permalink
Add --ts-config CLI option to specify a TypeScript config file
Browse files Browse the repository at this point in the history
  • Loading branch information
BPScott committed Jan 3, 2019
1 parent 17ba9c6 commit 1c48bb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,24 @@ program
.option('-d, --directory <path>', 'root of all files')
.option('-c, --config [path]', 'location of a RequireJS config file for AMD')
.option('-w, --webpack-config [path]', 'location of a webpack config file')
.option('-t, --ts-config [path]', 'location of a typescript config file')
.option('-f, --filename [path]', 'file containing the dependency')
.parse(process.argv);

var filename = program.filename;
var directory = program.directory;
var config = program.config;
var webpackConfig = program.webpackConfig;
var tsConfig = program.tsConfig;
var dep = program.args[0];

var result = cabinet({
partial: dep,
filename: filename,
directory: directory,
config: config,
webpackConfig: webpackConfig
webpackConfig: webpackConfig,
tsConfig: tsConfig
});

console.log(result);
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const defaultLookups = {
* @param {String} [options.nodeModulesConfig.entry] The new value for "main" in package json
* @param {String} [options.webpackConfig] Path to the webpack config
* @param {Object} [options.ast] A preparsed AST for the file identified by filename.
* @param {Object} [options.tsconfig] Path to a typescript config file
* @param {Object} [options.tsConfig] Path to a typescript config file
*/
module.exports = function cabinet(options) {
const {
Expand Down

0 comments on commit 1c48bb8

Please sign in to comment.