Skip to content

Commit

Permalink
Remove NPM config from Taskfile as it is no longer needed with react 19
Browse files Browse the repository at this point in the history
  • Loading branch information
rick-nu committed Dec 6, 2024
1 parent 32e726a commit a1ad6bc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
7 changes: 0 additions & 7 deletions Taskfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function banner {
# =========================================================

function task:init { ## Set up the project for local development
project:npm-config
project:git-config
task:update
task:help
Expand Down Expand Up @@ -52,12 +51,6 @@ function project:install-dependencies {
npm install
}

function project:npm-config {
title "Configuring NPM"
npm config --location=project set legacy-peer-deps=true \
&& echo -e "All ${GREEN}good${RESET}."
}

function project:git-config {
title "Setting git configuration"
git config --local core.hooksPath dev/git-hooks
Expand Down
10 changes: 5 additions & 5 deletions src/components/Generator/GeneredTaskfile/GeneratedTaskfile.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use client';

import {ReactElement} from 'react';
import {taskfile} from '@/components/Generator/GeneredTaskfile/taskfile';
import {useFormContext} from 'react-hook-form';
import {GeneratorSettings} from '@/components/Generator/Generator';
import { ReactElement } from 'react';
import { taskfile } from '@/components/Generator/GeneredTaskfile/taskfile';
import { useFormContext } from 'react-hook-form';
import { GeneratorSettings } from '@/components/Generator/Generator';
import SaveFile from './SaveFile';
import {highlighter} from './Highlighter';
import { highlighter } from './Highlighter';

const GeneratedTaskfile = (): ReactElement => {
const form = useFormContext<GeneratorSettings>();
Expand Down
11 changes: 8 additions & 3 deletions src/components/Generator/GeneredTaskfile/SaveFile/SaveFile.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import {ReactElement, useState} from 'react';
import { ReactElement, useState } from 'react';

import styles from './save-file.module.scss';

Expand All @@ -19,7 +19,7 @@ const CopyToClipboard = ({ content }: CopyProps): ReactElement => {
};

const download = (): void => {
const blob = new Blob([content], {type: 'text/x-shellscript'});
const blob = new Blob([content], { type: 'text/x-shellscript' });
const elem = window.document.createElement('a');
elem.href = window.URL.createObjectURL(blob);
elem.download = 'Taskfile';
Expand All @@ -31,7 +31,12 @@ const CopyToClipboard = ({ content }: CopyProps): ReactElement => {
return (
<div className={styles.container}>
<button type="button" className={`${styles.download}`} onClick={download} title="Download Taskfile" />
<button type="button" className={`${styles.copy} ${isCopied && styles.copied}`} onClick={onClick} title="Copy Taskfile content" />
<button
type="button"
className={`${styles.copy} ${isCopied && styles.copied}`}
onClick={onClick}
title="Copy Taskfile content"
/>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
background-repeat: no-repeat;
background-position: center;
border-radius: 0.2rem;
transition:
background-color 200ms ease-in-out;
transition: background-color 200ms ease-in-out;
}

.download {
Expand All @@ -32,10 +31,11 @@

.copy {
background-image: url('./clipboard.svg');
background-size: 1.0rem;
background-size: 1rem;
}

.copy:hover, .download:hover {
.copy:hover,
.download:hover {
color: #fff;
border-color: #fff;
}
Expand Down

0 comments on commit a1ad6bc

Please sign in to comment.