Skip to content

Commit

Permalink
Updated the build system
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Jun 11, 2019
1 parent a9e670f commit 0d8c5c4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
32 changes: 16 additions & 16 deletions etc/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ edit_uri: ''

copyright: Copyright © 2016 - 2019 Cédric Belin
google_analytics:
- !!python/object/apply:os.getenv [GOOGLE_ANALYTICS_ID]
- auto
- !!python/object/apply:os.getenv [GOOGLE_ANALYTICS_ID]
- auto

extra:
social:
- {type: globe, link: 'https://belin.io'}
- {type: github, link: 'https://github.com/cedx'}
- {type: twitter, link: 'https://twitter.com/cedxbelin'}
- {type: linkedin, link: 'https://linkedin.com/in/cedxbelin'}
- {type: globe, link: 'https://belin.io'}
- {type: github, link: 'https://github.com/cedx'}
- {type: twitter, link: 'https://twitter.com/cedxbelin'}
- {type: linkedin, link: 'https://linkedin.com/in/cedxbelin'}

markdown_extensions:
- admonition
- codehilite
- meta
- admonition
- codehilite
- meta

nav:
- Overview: index.md
- Installation: installation.md
- Usage: usage.md
- About:
- Changelog: about/changelog.md
- License: about/license.md
- See also: about/see_also.md
- Overview: index.md
- Installation: installation.md
- Usage: usage.md
- About:
- Changelog: about/changelog.md
- License: about/license.md
- See also: about/see_also.md

theme:
name: material
Expand Down
18 changes: 15 additions & 3 deletions gulpfile.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const sources = ['*.js', 'example/*.js', 'lib/**/*.js', 'test/**/*.js'];

// Shortcuts.
const {parallel, task, watch} = gulp;
const {copyFile} = promises;
const {access, copyFile} = promises;

// Initialize the build system.
const _path = 'PATH' in process.env ? process.env.PATH : '';
Expand All @@ -29,7 +29,16 @@ task('build', async () => {
task('clean', () => del(['.nyc_output', 'build', 'doc/api', 'var/**/*', 'web']));

/** Uploads the results of the code coverage. */
task('coverage', () => _exec('coveralls', ['var/lcov.info']));
task('coverage', async () => {
try {
await access('var/lcov.info');
return _exec('coveralls', ['var/lcov.info']);
}

catch {
return Promise.resolve();
}
});

/** Builds the documentation. */
task('doc', async () => {
Expand Down Expand Up @@ -64,7 +73,10 @@ task('upgrade', async () => {
});

/** Watches for file changes. */
task('watch', () => watch('test/**/*.js', task('test')));
task('watch', () => {
watch('lib/**/*.js', {ignoreInitial: false}, task('build'));
watch('test/**/*.js', task('test'));
});

/** Runs the default tasks. */
task('default', task('build'));
Expand Down

0 comments on commit 0d8c5c4

Please sign in to comment.