Skip to content

Commit 5140ec4

Browse files
committed
Add initial component parsing for build
1 parent d2e79ee commit 5140ec4

File tree

9 files changed

+28
-4
lines changed

9 files changed

+28
-4
lines changed

build/index.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const fs = require('fs')
2+
const compdoc = require('compdoc')
3+
const globby = require('globby')
4+
5+
const css = fs.readFileSync('node_modules/tachyons/css/tachyons.css', 'utf8')
6+
7+
const compGlob = process.argv.slice(2)[0] || '**'
8+
9+
globby(`build/components/${compGlob}/*.html`)
10+
.then(files => files.forEach(buildComponent))
11+
12+
const buildComponent = file => {
13+
const html = fs.readFileSync(file, 'utf8')
14+
15+
console.log(`Building ${file}`)
16+
compdoc(file, { html, css })
17+
.then({
18+
19+
})
20+
.catch(console.log)
21+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

data/meta.js

Whitespace-only changes.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
"scripts": {
66
"dev": "next",
77
"build": "next build",
8-
"start": "next start"
8+
"start": "next start"
99
},
1010
"repository": "tachyons-css/tachyons-css.github.io",
1111
"keywords": [],
1212
"author": "",
1313
"license": "ISC",
1414
"dependencies": {
15+
"compdoc": "0.0.1",
16+
"globby": "^6.1.0",
17+
"mkdirp": "^0.5.1",
1518
"next": "^1.1.2",
1619
"tachyons": "^4.5.5"
1720
}

pages/docs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import Link from 'next/link'
3-
import Layout from '../components/layout'
3+
import Layout from '../components/t/layout'
44

55
export default () => (
66
<Layout>

pages/docs/typography/docs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Layout from '../../../components/layout'
2+
import Layout from '../../../components/t/layout'
33

44
export default () => (
55
<Layout>

pages/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import Layout from '../components/layout'
2+
import Layout from '../components/t/layout'
33

44
export default () => (
55
<Layout>

0 commit comments

Comments
 (0)