From 1d16f3e307303ab8d7f09889b44aef3f8fc5d3a5 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Tue, 6 Nov 2018 18:31:08 +0800 Subject: [PATCH] build: fix paths --- package.json | 2 +- scripts/generate-octicon.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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 => {