Skip to content

Commit

Permalink
add sourceType config option
Browse files Browse the repository at this point in the history
Valid values are `module` (default) and `script`. Using `script` will suppress implied strict mode and will prevent you from using ES2015 modules.
  • Loading branch information
hegemonic committed Jul 7, 2017
1 parent f101798 commit 67db938
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/jsdoc/config.js
Expand Up @@ -30,6 +30,7 @@ var defaults = {
includePattern: '.+\\.js(doc|x)?$',
excludePattern: ''
},
sourceType: 'module',
tags: {
allowUnknownTags: true,
dictionaries: ['jsdoc', 'closure']
Expand Down
3 changes: 2 additions & 1 deletion lib/jsdoc/src/astbuilder.js
@@ -1,12 +1,13 @@
'use strict';

var babylon = require('babylon');
var env = require('jsdoc/env');
var logger = require('jsdoc/util/logger');

// exported so we can use them in tests
var parserOptions = exports.parserOptions = {
ranges: true,
sourceType: 'module',
sourceType: env.conf.sourceType,
plugins: [
'asyncGenerators',
'bigInt',
Expand Down

0 comments on commit 67db938

Please sign in to comment.