diff --git a/package.json b/package.json index 6e01898..9e9e390 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "license": "MIT", "private": true, "scripts": { - "postinstall": "node scripts/generate-octicons", + "postinstall": "node scripts/generate-octicon.js", "start": "webpack --watch", "postversion": "node scripts/version.js", "build": "NODE_ENV=production webpack && npm run postbuild", diff --git a/scripts/generate-octicon.js b/scripts/generate-octicon.js index 5f0ea80..58eb52f 100644 --- a/scripts/generate-octicon.js +++ b/scripts/generate-octicon.js @@ -1,7 +1,8 @@ const octicons = require('octicons') const fs = require('fs') +const path = require('path') -const pathToIconsFolder = `${__dirname}/src/assets/icons/octicons` +const pathToIconsFolder = path.resolve(__dirname, `../src/assets/icons/octicons`) function generateIconSVGFiles() { Object.values(octicons).forEach(icon => {