Skip to content

Commit

Permalink
Merge branch beta of https://github.com/Lubycon/lubycon-ui-kit into a…
Browse files Browse the repository at this point in the history
…lpha
  • Loading branch information
evan-moon committed Apr 9, 2021
2 parents dc9e90a + 779da4b commit 4fc2860
Show file tree
Hide file tree
Showing 41 changed files with 8,822 additions and 324 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ module.exports = {
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
},
};
11 changes: 11 additions & 0 deletions .github/workflows/alpha-release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,21 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Caching Gatsby Build
uses: actions/cache@v2
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-alpha-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-alpha-build-
- name: Install depedencies
run: yarn
- name: Build
run: yarn workspace lubycon-ui-kit-docs build
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
- name: Publish
run: yarn workspace lubycon-ui-kit-docs deploy
env:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/live-release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,21 @@ jobs:
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Caching Gatsby Build
uses: actions/cache@v2
with:
path: |
public
.cache
key: ${{ runner.os }}-gatsby-alpha-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install depedencies
run: yarn
- name: Build
run: yarn workspace lubycon-ui-kit-docs build
env:
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true
- name: Publish
run: yarn workspace lubycon-ui-kit-docs deploy
env:
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "lubycon-ui-kit-docs",
"name": "lubycon-ui-kit-docs-next",
"version": "1.0.0",
"private": true,
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions lubycon-ui-kit-docs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['../.eslintrc.js'],
};
115 changes: 115 additions & 0 deletions lubycon-ui-kit-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# =========================
# Node.js-Specific Ignores
# =========================

# Build directory
public/

# Gatsby cache
.cache/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
1 change: 1 addition & 0 deletions lubycon-ui-kit-docs/CNAME.alpha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui-kit.alpha.lubycon.io
1 change: 1 addition & 0 deletions lubycon-ui-kit-docs/CNAME.live
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui-kit.lubycon.io
10 changes: 10 additions & 0 deletions lubycon-ui-kit-docs/gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import App from 'src/App';

import 'normalize.css';
import '@lubycon/ui-kit/css/lubycon-ui-kit.min.css';
import 'src/styles/prism-theme.css';

export const wrapRootElement = ({ element }) => {
return <App>{element}</App>;
};
75 changes: 75 additions & 0 deletions lubycon-ui-kit-docs/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
'use strict';
const path = require('path');

module.exports = {
siteMetadata: {
title: 'Lubycon UI Kit',
description: 'Lubycon UI Kit 입니다',
keywords: 'Lubycon, UI Kit',
siteUrl: 'https://ui-kit.lubycon.io',
author: 'Lubycon',
},
plugins: [
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'content',
path: `${__dirname}/src/content`,
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [`.mdx`, `.md`],
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 800,
},
},
{
resolve: `gatsby-remark-responsive-iframe`,
options: {
wrapperStyle: `margin-bottom: 1.0725rem`,
},
},
{
resolve: `gatsby-remark-external-links`,
options: {
target: '_blank',
rel: 'nofollow',
},
},
`gatsby-remark-prismjs`,
`gatsby-remark-copy-linked-files`,
`gatsby-remark-smartypants`,
],
plugins: [`gatsby-remark-images`],
},
},

'gatsby-transformer-json',
{
resolve: 'gatsby-plugin-canonical-urls',
options: {
siteUrl: 'https://gatsby-starter-typescript-plus.netlify.com',
},
},
{
resolve: 'gatsby-plugin-root-import',
options: {
src: path.join(__dirname, 'src'),
pages: path.join(__dirname, 'src/pages'),
components: path.join(__dirname, 'src/components'),
constants: path.join(__dirname, 'src/constants'),
utils: path.join(__dirname, 'src/utils'),
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
'gatsby-plugin-emotion',
'gatsby-plugin-typescript',
'gatsby-plugin-react-helmet',
],
};
41 changes: 41 additions & 0 deletions lubycon-ui-kit-docs/gatsby-hooks/createPages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const path = require('path');

async function createPages({ actions, graphql, reporter }) {
const { createPage } = actions;
const pageTemplate = path.resolve('src/templates/page.tsx');

const query = await graphql(`
{
allMdx(sort: { order: DESC, fields: [frontmatter___order] }, limit: 1000) {
edges {
node {
fields {
path
}
frontmatter {
title
}
}
}
}
}
`);
if (query.errors) {
reporter.panicOnBuild(`Error while running GraphQL query.`);
return;
}

if (query.data == null) {
return;
}

const pages = query.data.allMdx.edges;
pages.forEach(({ node: page }) => {
createPage({
path: page.fields.path,
component: pageTemplate,
});
});
}

exports.createPages = createPages;
18 changes: 18 additions & 0 deletions lubycon-ui-kit-docs/gatsby-hooks/onCreateNode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
function onCreateNode({ node, actions, getNode }) {
const { createNodeField } = actions;

if (node.internal.type === 'Mdx') {
const { relativePath } = getNode(node.parent);
const path = `/${relativePath.replace('.mdx', '')}`;

console.log(`🔗 Page is created! -> ${path}`);

createNodeField({
name: 'path',
node,
value: path,
});
}
}

exports.onCreateNode = onCreateNode;
5 changes: 5 additions & 0 deletions lubycon-ui-kit-docs/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { createPages } = require('./gatsby-hooks/createPages');
const { onCreateNode } = require('./gatsby-hooks/onCreateNode');

exports.createPages = createPages;
exports.onCreateNode = onCreateNode;
7 changes: 7 additions & 0 deletions lubycon-ui-kit-docs/gatsby-ssr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/

// You can delete this file if you're not using it
Loading

0 comments on commit 4fc2860

Please sign in to comment.