diff --git a/docsSource/index.js b/docsSource/index.js index 516a29c9c..6e106109e 100644 --- a/docsSource/index.js +++ b/docsSource/index.js @@ -1,7 +1,7 @@ const path = require('path'); const fs = require('fs'); -const {version} = JSON.parse(fs.readFileSync('package.json')); +const {version} = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'))); const compileMD = require('./compileMD'); const compileAnimationList = require('./compileAnimationList'); @@ -23,4 +23,3 @@ fs.writeFile(output, withVersion, 'utf8', (err) => { if (err) console.error(err); console.log('Template compiled succesfully.'); }); - diff --git a/postcss.config.js b/postcss.config.js index 14d6401f3..faec7ad96 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,8 @@ const fs = require('fs'); -const {homepage, version, author, animateConfig} = JSON.parse(fs.readFileSync('package.json')); +const path = require('path'); +const {homepage, version, author, animateConfig} = JSON.parse( + fs.readFileSync(path.join(__dirname, 'package.json')), +); const header = ` @charset "UTF-8";