diff --git a/package.json b/package.json index bf1691a..3d5f9b3 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,14 @@ "scripts": { "lint:js": "eslint ./gatsby-*.{js,jsx} && eslint ./src/**/*.{js,jsx}", "lint:css": "stylelint ./src/**/*.{css,scss}", - "lint": "npm run lint:js && npm run lint:css", + "lint": "npm run svg && npm run lint:js && npm run lint:css", "build": "npm run svg && ./node_modules/gatsby/dist/bin/gatsby.js build", "start": "npm run svg && ./node_modules/gatsby/dist/bin/gatsby.js develop", "format": "prettier --write 'src/**/*.{js,jsx}'", "format:css": "prettier-stylelint --write --quiet 'src/**/*.{css,scss}'", "test": "npm run lint", "deploy": "./scripts/deploy.sh", - "new": "node ./scripts/new-project.js", + "new": "node ./scripts/new.js", "svg": "./scripts/svg.sh" }, "dependencies": { diff --git a/scripts/new-project.js b/scripts/new.js similarity index 92% rename from scripts/new-project.js rename to scripts/new.js index 5859505..88c1274 100644 --- a/scripts/new-project.js +++ b/scripts/new.js @@ -4,7 +4,7 @@ const prepend = require('prepend') const slugify = require('slugify') const ora = require('ora') -const templatePath = path.join(__dirname, 'new-project.yml') +const templatePath = path.join(__dirname, 'new.yml') const template = fs.readFileSync(templatePath).toString() const spinner = ora('Adding new project').start() diff --git a/scripts/new-project.yml b/scripts/new.yml similarity index 100% rename from scripts/new-project.yml rename to scripts/new.yml diff --git a/scripts/svg.sh b/scripts/svg.sh index f274d95..4eb422a 100755 --- a/scripts/svg.sh +++ b/scripts/svg.sh @@ -4,5 +4,9 @@ set -e SRC='./src/images' OUT='./src/components/svg' +printf "Creating SVG components...\\n\\n" + # Usage: svgr [-d out-dir] [src-dir] ./node_modules/@svgr/cli/bin/svgr --icon -d $OUT $SRC + +printf "\\nšŸŽ‰ Successfully created SVG components\\n\\n"