mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
add sourceType config option
Valid values are `module` (default) and `script`. Using `script` will suppress implied strict mode and will prevent you from using ES2015 modules.
This commit is contained in:
parent
f1017988ec
commit
67db938c0b
@ -30,6 +30,7 @@ var defaults = {
|
||||
includePattern: '.+\\.js(doc|x)?$',
|
||||
excludePattern: ''
|
||||
},
|
||||
sourceType: 'module',
|
||||
tags: {
|
||||
allowUnknownTags: true,
|
||||
dictionaries: ['jsdoc', 'closure']
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user