mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 14:30:22 +00:00
feat: added opensource license
This commit is contained in:
parent
42f5c0a7f7
commit
d9677b05c3
@ -73,7 +73,7 @@ const Footer = ({ color, theme, setTheme }:FooterProps): JSX.Element => {
|
|||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Link href='/opensource'>
|
<Link href='/license'>
|
||||||
<a className='hover:text-gray-300'>오픈소스 라이선스</a>
|
<a className='hover:text-gray-300'>오픈소스 라이선스</a>
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
"discord.js": "12.5.1",
|
"discord.js": "12.5.1",
|
||||||
"emoji-mart": "3.0.1",
|
"emoji-mart": "3.0.1",
|
||||||
"formik": "2.2.6",
|
"formik": "2.2.6",
|
||||||
|
"generate-license-file": "^1.1.0",
|
||||||
"josa": "3.0.1",
|
"josa": "3.0.1",
|
||||||
"jsonwebtoken": "8.5.1",
|
"jsonwebtoken": "8.5.1",
|
||||||
"knex": "0.21.18",
|
"knex": "0.21.18",
|
||||||
|
|||||||
@ -1,12 +1,16 @@
|
|||||||
import { NextPage } from 'next'
|
import { NextPage } from 'next'
|
||||||
import dynamic from 'next/dynamic'
|
import dynamic from 'next/dynamic'
|
||||||
|
|
||||||
|
import * as generateLicenseFile from 'generate-license-file'
|
||||||
|
import { ILicense } from 'generate-license-file/dist/models/license.interface'
|
||||||
|
|
||||||
const Docs = dynamic(()=> import('@components/Docs'))
|
const Docs = dynamic(()=> import('@components/Docs'))
|
||||||
const Segment = dynamic(() => import('@components/Segment'))
|
const Segment = dynamic(() => import('@components/Segment'))
|
||||||
const Markdown = dynamic(() => import('@components/Markdown'))
|
const Markdown = dynamic(() => import('@components/Markdown'))
|
||||||
|
|
||||||
const Opensource: NextPage<OpensourceProps> = ({ packageJson }) => {
|
|
||||||
|
const Opensource: NextPage<OpensourceProps> = ({ packageJson, license }) => {
|
||||||
|
console.log(license)
|
||||||
return <Docs title='오픈소스' header={<h1 className='font-black text-4xl'>
|
return <Docs title='오픈소스' header={<h1 className='font-black text-4xl'>
|
||||||
<span className='text-koreanbots-blue'>한디리</span>
|
<span className='text-koreanbots-blue'>한디리</span>
|
||||||
<span><i className='text-red-500 fas fa-heart mx-2' /> </span>
|
<span><i className='text-red-500 fas fa-heart mx-2' /> </span>
|
||||||
@ -706,22 +710,36 @@ For more information on this, and how to apply and follow the GNU AGPL, see
|
|||||||
{
|
{
|
||||||
Object.keys(packageJson.dependencies).concat(Object.keys(packageJson.devDependencies)).map(el=> <span key={el}><a className='text-blue-500 hover:text-blue-400' href={`https://npmjs.org/package/${el}`}>{el}</a> </span>)
|
Object.keys(packageJson.dependencies).concat(Object.keys(packageJson.devDependencies)).map(el=> <span key={el}><a className='text-blue-500 hover:text-blue-400' href={`https://npmjs.org/package/${el}`}>{el}</a> </span>)
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
license.map(el=>
|
||||||
|
<>
|
||||||
|
<h2 className='text-xl font-semibold my-3'>{el.dependencies.join(', ')}</h2>
|
||||||
|
<Segment>
|
||||||
|
<Markdown text={el.content} />
|
||||||
|
</Segment>
|
||||||
|
</>)
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</Docs>
|
</Docs>
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OpensourceProps {
|
interface OpensourceProps {
|
||||||
packageJson: {
|
packageJson: {
|
||||||
dependencies: Record<string, string>
|
dependencies: Record<string, string>
|
||||||
devDependencies: Record<string, string>
|
devDependencies: Record<string, string>
|
||||||
}
|
}
|
||||||
|
license: ILicense[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getStaticProps () {
|
export async function getStaticProps () {
|
||||||
|
const license = await generateLicenseFile.getProjectLicenses('./').then(license => license)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
packageJson: require('package.json')
|
packageJson: require('package.json'),
|
||||||
|
license
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
export default Opensource
|
export default Opensource
|
||||||
Loading…
x
Reference in New Issue
Block a user