Comments (3)
So the solution is to require your config file like so
const esdocConfig = require( "./path/to/dir/esdoc.json" );
then:
gulp.src(["./src"]).pipe( esDoc( esdocConfig ) );
Should do it!
from gulp-esdoc.
I have checked your code and find that config file is 'path/to/dir/esdoc.json'. please use the input string user-defined path instead when config is a STRING.
from gulp-esdoc.
This plugin supports ESDoc config file. The real issue is in the name of the file it looks for: tt should look for .esdoc.json
as stated by the docs, but instead looks for a esdoc.json
file.
ESDoc automatically finds the configuration file path by the order, if you don't specify -c esdoc.json.
- .esdoc.json in the current directory
- .esdoc.js in the current directory
- esdoc property in package.json
In the meantime, you could do something like this ES6 code, which I myself use:
let esdocConfigPath = path.join(process.cwd(), '.esdoc.json'), data, esdocConfig;
if (fs.existsSync(esdocConfigPath)) {
data = fs.readFileSync(esdocConfigPath, { encoding: 'utf8' });
esdocConfig = !data ? {} : JSON.parse(data);
console.log('Found ESDoc config in .esdoc.json!');
} else {
esdocConfig = {};
}
from gulp-esdoc.
Related Issues (12)
- Handle custom parsers HOT 1
- IceCap missing dependency? HOT 4
- IceCap Unexpected strict mode reserved word with gulp-esdoc 0.2.0 + es-doc 0.4.7 HOT 1
- TypeError: ESDoc.generate is not a function
- ESDoc.generate HOT 1
- Please update to ESDoc 1.0.1
- manual is not generated with gulp task but works fine in normal esdoc HOT 1
- Plugin does not use stream to generate docs
- Seems like gulp-esdoc doesn't pick up esdoc configuration file. HOT 1
- I can only see my README.md contents
- RangeError: Maximum call stack size exceeded HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-esdoc.