fix build crash
This commit is contained in:
16
build.js
16
build.js
@@ -56,19 +56,3 @@ filename = 'js/impress.min.js.map';
|
||||
fs.writeFileSync(filename, result.map);
|
||||
console.log(filename);
|
||||
|
||||
/* Auto generate an index.html that lists all the directories under examples/
|
||||
* This is useful for gh-pages, so you can link to http://impress.github.io/impress.js/examples
|
||||
*/
|
||||
var html_list = '<ul><br />\n'
|
||||
ls( 'examples/*', { type: 'dir' }).forEach(function(dir) {
|
||||
html_list += ' <li><a href="' + dir['file'] + '/">' + dir['name'] + '</a></li>\n';
|
||||
});
|
||||
html_list += '</ul>\n'
|
||||
|
||||
var html = '<html>\n<head>\n<title>Example presentations</title>\n</head>\n<body>'
|
||||
html += '<h1>Example presentations</h1>\n' + html_list
|
||||
html += '</body>\n</html>'
|
||||
|
||||
filename = path.resolve(__dirname, 'examples', 'index.html');
|
||||
fs.writeFileSync(filename, html);
|
||||
console.log(filename);
|
||||
|
||||
@@ -171,3 +171,7 @@ body {
|
||||
width: 40%;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
text-align: justify;
|
||||
}
|
||||
@@ -4,12 +4,13 @@
|
||||
</head>
|
||||
<body><h1>Example presentations</h1>
|
||||
<ul><br />
|
||||
<li><a href="2D-navigation/">2D-navigation</a></li>
|
||||
<li><a href="3D-positions/">3D-positions</a></li>
|
||||
<li><a href="3D-rotations/">3D-rotations</a></li>
|
||||
<li><a href="classic-slides/">classic-slides</a></li>
|
||||
<li><a href="cube/">cube</a></li>
|
||||
<li><a href="markdown/">markdown</a></li>
|
||||
<li><a href="undefined/">undefined</a></li>
|
||||
<li><a href="undefined/">undefined</a></li>
|
||||
<li><a href="undefined/">undefined</a></li>
|
||||
<li><a href="undefined/">undefined</a></li>
|
||||
<li><a href="undefined/">undefined</a></li>
|
||||
<li><a href="undefined/">undefined</a></li>
|
||||
<li><a href="undefined/">undefined</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@@ -17,6 +17,7 @@ const path = require( 'path' );
|
||||
const mdhtml = require( 'markdown-it' );
|
||||
const md2html = new mdhtml();
|
||||
const docRoot = path.join( __dirname + '/../' );
|
||||
const ls = require( 'ls' );
|
||||
const prompt = require( 'prompt-sync' )( {
|
||||
sigint: true
|
||||
} );
|
||||
@@ -58,6 +59,8 @@ for ( let obj in docPages ) {
|
||||
console.log( 'regenerating Nav' );
|
||||
generateNav ();
|
||||
|
||||
buildExamplesPage();
|
||||
|
||||
/*
|
||||
This function finds links. The reason for this is possible incompatibilities with links on the website
|
||||
*/
|
||||
@@ -265,6 +268,28 @@ function parseDocumentationMD () {
|
||||
}
|
||||
};
|
||||
storeHTML( updatedPage, title, 'reference' );
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function generateGettingStarted () {
|
||||
|
||||
}
|
||||
|
||||
function buildExamplesPage () {
|
||||
/* Auto generate an index.html that lists all the directories under examples/
|
||||
* This is useful for gh-pages, so you can link to http://impress.github.io/impress.js/examples
|
||||
*/
|
||||
var html_list = '<ul><br />\n'
|
||||
let dirList = fs.readdirSync( path.join( __dirname + '/../../demo/examples' ) )
|
||||
dirList.forEach( function( dir ) {
|
||||
html_list += ' <li><a href="' + dir['file'] + '/">' + dir[ 'name' ] + '</a></li>\n';
|
||||
});
|
||||
html_list += '</ul>\n'
|
||||
|
||||
var html = '<html>\n<head>\n<title>Example presentations</title>\n</head>\n<body>'
|
||||
html += '<h1>Example presentations</h1>\n' + html_list
|
||||
html += '</body>\n</html>'
|
||||
|
||||
fs.writeFileSync( path.join( __dirname + '/../../demo/examples/index.html' ), html );
|
||||
}
|
||||
@@ -34,7 +34,11 @@
|
||||
<!--TODO: Add html demo code-->
|
||||
<pre>
|
||||
<code>
|
||||
<div></div>
|
||||
<div id="impress">
|
||||
<div class="step">
|
||||
<h1>impress.js - The JavaScript presentation framework</h1>
|
||||
</div>
|
||||
</div>
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user