diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0711dee..8f1f1f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,22 +26,22 @@ jobs: run: | yarn test - build-and-deploy: - name: Publish - needs: [lint] - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip ci')" - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Volta setup - uses: rwjblue/setup-volta@v1 - - name: Install - run: yarn install - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GH_PAT }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: yarn semantic-release + # build-and-deploy: + # name: Publish + # needs: [lint] + # runs-on: ubuntu-latest + # if: "!contains(github.event.head_commit.message, 'skip ci')" + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - name: Volta setup + # uses: rwjblue/setup-volta@v1 + # - name: Install + # run: yarn install + # - name: Release + # env: + # GITHUB_TOKEN: ${{ secrets.GH_PAT }} + # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + # run: yarn semantic-release diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index 0bd658f..0000000 --- a/.husky/commit-msg +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx --no-install commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 01d4d99..0000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npm run lint -npm test diff --git a/bin/cli.js b/bin/cli.js index 6d43e2b..c5d7f27 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -8,7 +8,7 @@ const { createBackup, helpMessage, existingTheme, - themesFolder, + themesFolder } = require('../src/helpers'); const { applyTheme, createConfigFile, getCurrentTheme } = require('../index'); @@ -19,12 +19,12 @@ let themes = fs .map((f) => f.replace('.toml', '')); function main() { - createBackup(); + // createBackup(); const command = process.argv[2]; - if (existingTheme(command, themesFolderPath)) { - return applyTheme(command, themesFolderPath); - } + // if (existingTheme(command, themesFolderPath)) { + // return applyTheme(command, themesFolderPath); + // } if (['--directory', '-d'].includes(command)) { if (process.argv[3] === undefined) { @@ -63,16 +63,20 @@ function main() { choices: themes.map((t) => { return { title: t, - value: t, + value: t }; }), onState: (state) => { - state.value && applyTheme(state.value, themesFolderPath, true); // set preview true + // state.value && applyTheme(state.value, themesFolderPath, true); // set preview true }, + onCancel: (state) => { + // revert to backup + } }); try { if (response.theme) { + createBackup(); applyTheme(response.theme, themesFolderPath); } } catch (e) { diff --git a/index.js b/index.js index bca188d..a5620a2 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ const { alacrittyFileExists, alacrittyTemplatePath, pathToAlacrittyFile, - themeFilePath, + themeFilePath } = require('./src/helpers'); const { exit } = require('process'); @@ -122,5 +122,5 @@ module.exports = { applyTheme, createConfigFile, getAlacrittyConfig, - getCurrentTheme, + getCurrentTheme }; diff --git a/package-lock.json b/package-lock.json index 84bf877..6768120 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alacritty-themes", - "version": "5.3.1", + "version": "6.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "alacritty-themes", - "version": "5.3.1", + "version": "6.0.1", "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", diff --git a/package.json b/package.json index 38d65d6..d4a9fac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alacritty-themes", - "version": "6.0.0", + "version": "6.0.1", "description": "Themes for Alacritty : A cross-platform GPU-Accelerated Terminal emulator", "main": "index.js", "bin": {