build: fix paths

This commit is contained in:
EnixCoda 2018-11-06 18:31:08 +08:00
parent 03b5b2bf65
commit 1d16f3e307
No known key found for this signature in database
GPG key ID: 6825847C88AA329A
2 changed files with 3 additions and 2 deletions

View file

@ -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",

View file

@ -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 => {