Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #150 from 30-seconds/yild-v2
Browse files Browse the repository at this point in the history
Resolves #148
Resolves #145
  • Loading branch information
Chalarangelo authored Sep 6, 2020
2 parents 7fbecac + a36e787 commit 2e43bf8
Show file tree
Hide file tree
Showing 92 changed files with 1,863 additions and 2,684 deletions.
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=development
CACHE_KEY=dev_2020_08
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=production
CACHE_KEY=30swp20200826234402
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,4 @@ public
.content
content/data
static/assets
src/xml/sitemap.xml
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"eslint.autoFixOnSave": true,
"git.detectSubmodules": false,
"editor.rulers": [
80
],
"files.insertFinalNewline": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"diffEditor.ignoreTrimWhitespace": false,
"files.trimTrailingWhitespace": true
}
6 changes: 0 additions & 6 deletions Procfile

This file was deleted.

Binary file modified assets/icons.woff2
Binary file not shown.
6 changes: 2 additions & 4 deletions content/configs/30blog.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30blog",
"repoUrl": "https://github.com/30-seconds/30-seconds-blog",
"snippetPath": "blog_posts",
"requirables": [
"blog_data/snippets.json"
],
"slug": "blog",
"resolver": "blogResolver",
"isBlog": true,
Expand All @@ -19,5 +16,6 @@
"images": {
"name": "blog_images",
"path": "blog_images"
}
},
"cardTemplate": "BlogSnippetCard"
}
3 changes: 0 additions & 3 deletions content/configs/30code.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30code",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-code",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "js",
"long": "JavaScript"
Expand Down
3 changes: 0 additions & 3 deletions content/configs/30csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30csharp",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-csharp",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "csharp",
"long": "C#"
Expand Down
6 changes: 2 additions & 4 deletions content/configs/30css.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30css",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-css",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "css",
"long": "CSS"
Expand All @@ -26,5 +23,6 @@
"foreColor": "#ffffff",
"iconName": "css"
},
"biasPenaltyMultiplier": 1.05
"biasPenaltyMultiplier": 1.05,
"cardTemplate": "CssSnippetCard"
}
3 changes: 0 additions & 3 deletions content/configs/30dart.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30dart",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-dart",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "dart",
"long": "Dart"
Expand Down
3 changes: 0 additions & 3 deletions content/configs/30golang.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30golang",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-golang",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "go",
"long": "Go"
Expand Down
3 changes: 0 additions & 3 deletions content/configs/30php.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30php",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-php",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "php",
"long": "PHP"
Expand Down
3 changes: 0 additions & 3 deletions content/configs/30python.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30python",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-python",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "py",
"long": "Python"
Expand Down
3 changes: 0 additions & 3 deletions content/configs/30react.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"dirName": "30react",
"repoUrl": "https://github.com/30-seconds/30-seconds-of-react",
"snippetPath": "snippets",
"requirables": [
"snippet_data/snippets.json"
],
"language": {
"short": "jsx",
"long": "React"
Expand Down
2 changes: 1 addition & 1 deletion content/sources/30blog
1 change: 0 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
},
plugins: [
`gatsby-plugin-resolve-src`,
`gatsby-plugin-sitemap`,
{
resolve: `gatsby-source-filesystem`,
options: {
Expand Down
31 changes: 8 additions & 23 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,14 @@
const { green } = require('kleur');
const env = require('./.build/env').default;

const { green } = require('chalk');
const {
sourceNodes,
createPages,
onCreateWebpackConfig,
} = require(`./src/build`);
const {
parseQueries,
parseRequirables,
parseTemplates,
} = require(`./src/build/parsers`);
const paths = require(`./src/config/paths`);

const requirables = parseRequirables(paths.contentPath);
console.log(`${green('success')} parse requirables`);

const templates = parseTemplates(env === 'DEVELOPMENT' ? paths.devTemplates : paths.templates, paths.templatesPath);
console.log(`${green('success')} parse templates`);

const pagesQuery = parseQueries(paths.queryPath);
console.log(`${green('success')} parse queries`);

exports.createPages = createPages(pagesQuery, templates, requirables);
onPostBuild,
parseRequirements,
} = require(`./src/gatsby`);

exports.sourceNodes = sourceNodes(requirables);
const { requirables, templates} = parseRequirements();
console.log(`${green('success')} parse requirements`);

exports.createPages = createPages(templates, requirables);
exports.onCreateWebpackConfig = onCreateWebpackConfig;
exports.onPostBuild = onPostBuild;
Loading

0 comments on commit 2e43bf8

Please sign in to comment.