Skip to content

Commit

Permalink
🔧 Improve documentation building
Browse files Browse the repository at this point in the history
  • Loading branch information
theus committed Jul 26, 2017
1 parent 2a86f46 commit 6e18e5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ var exec = require('child_process').exec;
var importFresh = require('import-fresh');
var slugg = require('slugg');

const version = importFresh('./package.json').version;
gulp.task('compile', ['doc'], function () {
const { version } = importFresh('./package.json');

gulp.task('compile', function () {
let docjson = collect(importFresh('./doc.json'))
let doc = {}

Expand Down Expand Up @@ -61,13 +61,16 @@ gulp.task('compile', function () {
.pipe(gulp.dest('./'));
});

gulp.task('doc', function () {
exec('npm run doc:generate');
gulp.task('doc', function (done) {
exec('npm run doc:generate', function (err) {
if (err) return done(err);
done();
});
});

gulp.task('watch', function () {
gulp.watch('./site/**/*.twig', ['compile']);
gulp.watch('./site/src/**/*', ['doc']);
gulp.watch('./src/**/*', ['doc']);
gulp.watch('./doc.json', ['compile']);
});

Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<div class="Header-logo-slogan">
Create hamburgers' menu like a chef
<br>
<span>v1.1.0</span>
<span>v1.1.1</span>
</div>
<div class="Header-logo-btns">
<a class="github-button" href="https://github.com/theus/MenuChef" data-icon="octicon-star" data-show-count="true" aria-label="Star theus/instantgargom on GitHub" data-size="large">Star</a>
Expand Down Expand Up @@ -271,7 +271,7 @@ <h1 class="title">the oven</h1>
You can download the latest version of MenuChef in <a href="https://github.com/theus/menuchef">Github</a> or can use the unpkg CDN
</p>

<pre><code class="language-html">&lt;script src="//unpkg.com/[email protected].0"&gt;&lt;/script&gt;</code></pre>
<pre><code class="language-html">&lt;script src="//unpkg.com/[email protected].1"&gt;&lt;/script&gt;</code></pre>

</div>

Expand Down

0 comments on commit 6e18e5e

Please sign in to comment.