chore: prettier erabiltzen du
This commit is contained in:
3
.prettierignore
Normal file
3
.prettierignore
Normal file
@@ -0,0 +1,3 @@
|
||||
front/node_modules
|
||||
front/public
|
||||
front/.cache
|
||||
11
.prettierrc
Normal file
11
.prettierrc
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"bracketSpacing": true,
|
||||
"bracketSameLine": false,
|
||||
"arrowParens": "avoid"
|
||||
}
|
||||
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
}
|
||||
@@ -1,39 +1,39 @@
|
||||
require("dotenv").config({
|
||||
path: `.env`,
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
"gatsby-plugin-react-helmet",
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `images`,
|
||||
path: `${__dirname}/src/images`,
|
||||
},
|
||||
require('dotenv').config({
|
||||
path: `.env`,
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
'gatsby-plugin-react-helmet',
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `images`,
|
||||
path: `${__dirname}/src/images`,
|
||||
},
|
||||
{
|
||||
resolve: "gatsby-source-strapi",
|
||||
options: {
|
||||
apiURL: process.env.API_URL || "http://localhost:1337/api",
|
||||
singleTypes: ["hasiera"],
|
||||
queryLimit: 1000,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-source-strapi',
|
||||
options: {
|
||||
apiURL: process.env.API_URL || 'http://localhost:1337/api',
|
||||
singleTypes: ['hasiera'],
|
||||
queryLimit: 1000,
|
||||
},
|
||||
"gatsby-transformer-sharp",
|
||||
"gatsby-plugin-sharp",
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: "gatsby-starter-default",
|
||||
short_name: "starter",
|
||||
start_url: "/",
|
||||
background_color: `#663399`,
|
||||
theme_color: `#663399`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/images/favicon.png`,
|
||||
},
|
||||
},
|
||||
'gatsby-transformer-sharp',
|
||||
'gatsby-plugin-sharp',
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: 'gatsby-starter-default',
|
||||
short_name: 'starter',
|
||||
start_url: '/',
|
||||
background_color: `#663399`,
|
||||
theme_color: `#663399`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/images/favicon.png`,
|
||||
},
|
||||
"gatsby-plugin-sitemap"
|
||||
],
|
||||
}
|
||||
},
|
||||
'gatsby-plugin-sitemap',
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
import React from "react"
|
||||
import { Link } from "gatsby"
|
||||
import React from 'react';
|
||||
import { Link } from 'gatsby';
|
||||
|
||||
const NotFoundPage: React.VFC = () => {
|
||||
return (
|
||||
<main>
|
||||
|
||||
<h1 >Ez dugu orria topatu</h1>
|
||||
|
||||
<br />
|
||||
<Link to="/">Go home</Link>.
|
||||
<h1>Ez dugu orria topatu</h1>
|
||||
<br />
|
||||
<Link to="/">Go home</Link>.
|
||||
</main>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export default NotFoundPage
|
||||
export default NotFoundPage;
|
||||
|
||||
@@ -1,34 +1,37 @@
|
||||
import { graphql, PageProps, useStaticQuery } from "gatsby"
|
||||
import React from "react"
|
||||
import { graphql, PageProps, useStaticQuery } from 'gatsby';
|
||||
import React from 'react';
|
||||
|
||||
interface DataProps {
|
||||
strapiHasiera: {
|
||||
data: {
|
||||
attributes: {
|
||||
deskribapena: string
|
||||
izenburua: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deskribapena: string;
|
||||
izenburua: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
const IndexPage: React.VFC<PageProps<DataProps>> = () => {
|
||||
const {strapiHasiera} = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiHasiera {
|
||||
data {
|
||||
attributes {
|
||||
deskribapena
|
||||
izenburua
|
||||
const { strapiHasiera } = useStaticQuery<DataProps>(graphql`
|
||||
{
|
||||
strapiHasiera {
|
||||
data {
|
||||
attributes {
|
||||
deskribapena
|
||||
izenburua
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
return (
|
||||
<main><h1>{strapiHasiera.data.attributes.izenburua}</h1><p>{strapiHasiera.data.attributes.deskribapena}</p></main>
|
||||
)
|
||||
}
|
||||
`);
|
||||
|
||||
export default IndexPage
|
||||
return (
|
||||
<main>
|
||||
<h1>{strapiHasiera.data.attributes.izenburua}</h1>
|
||||
<p>{strapiHasiera.data.attributes.deskribapena}</p>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
export default IndexPage;
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
"scripts": {
|
||||
"start:back": "yarn workspace back start",
|
||||
"develop:back": "yarn workspace back develop",
|
||||
"develop:front": "yarn workspace front develop"
|
||||
"develop:front": "yarn workspace front develop",
|
||||
"prettier:front": "yarn prettier front --write"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -27,5 +28,8 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/labasarea/laba-webgunea/issues"
|
||||
},
|
||||
"homepage": "https://github.com/labasarea/laba-webgunea#readme"
|
||||
"homepage": "https://github.com/labasarea/laba-webgunea#readme",
|
||||
"devDependencies": {
|
||||
"prettier": "^2.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11921,6 +11921,11 @@ prepend-http@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
||||
|
||||
prettier@^2.5.1:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a"
|
||||
integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==
|
||||
|
||||
pretty-bytes@^5.4.1:
|
||||
version "5.6.0"
|
||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
|
||||
|
||||
Reference in New Issue
Block a user