mirror of
https://github.com/animate-css/animate.css.git
synced 2024-11-10 21:36:31 +01:00
3d9aef2ba6
* corrections were made * added dark-mode * back-to-top-button added * back-to-top button edited * back-to-top button edited * last edit * last edit * arrangements were made * dark-mode-button-updated * dark-mode-option-added
27 lines
854 B
JavaScript
27 lines
854 B
JavaScript
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
const {version} = JSON.parse(fs.readFileSync('package.json'));
|
|
const compileMD = require('./compileMD');
|
|
const compileAnimationList = require('./compileAnimationList');
|
|
|
|
const templatePath = path.join(__dirname, 'template.html');
|
|
const template = fs.readFileSync(templatePath, 'utf8');
|
|
const outputPath = '../docs';
|
|
const outputFile = 'index.html';
|
|
|
|
const docs = compileMD();
|
|
const list = compileAnimationList();
|
|
|
|
const output = path.join(__dirname, outputPath, outputFile);
|
|
|
|
const withDocs = template.replace('{{docs}}', docs);
|
|
const withListAndDocs = withDocs.replace('{{list}}', list);
|
|
const withVersion = withListAndDocs.replace('{{version}}', version);
|
|
|
|
fs.writeFile(output, withVersion, 'utf8', (err) => {
|
|
if (err) console.error(err);
|
|
console.log('Template compiled succesfully.');
|
|
});
|
|
|