Skip to content

Commit ffa734c

Browse files
committed
Break more source code into the src directory
1 parent b242538 commit ffa734c

File tree

94 files changed

+25
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+25
-17
lines changed

build.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ var conditionals = require('postcss-conditionals')
1212
var cssvariables = require('postcss-css-variables')
1313
var customMedia = require('postcss-custom-media')
1414

15-
var componentsBuild = require('./components-build')
15+
var componentsBuild = require('./src/components-build')
1616

1717
// css to be processed
18-
var css = fs.readFileSync('src/tachyons.css', 'utf8')
18+
var css = fs.readFileSync('src/css/tachyons.css', 'utf8')
1919

2020
// process css
2121
var output = postcss([
2222
atImport(), cssvariables(), conditionals(), customMedia(), autoprefixer()
2323
]).process(css, {
24-
from: 'src/tachyons.css',
24+
from: 'src/css/tachyons.css',
2525
to: 'css/tachyons.css'
2626
}).css
2727

examples/components/forms/sign_in/1/index.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
</fieldset>
3636
</form>
3737

38+
<!--
39+
!!! Don't include the component data for now
40+
3841
<ul>
3942
4043
<li>.pvl</li>
@@ -253,7 +256,7 @@
253256
254257
255258
256-
259+
-->
257260

258261
<footer class="bg-white gray phm pvxl pvxxl-ns bt b--light-gray h-50">
259262
<small class="f5 mw7 db center lh-copy">

examples/components/forms/sign_up/1/index.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
</fieldset>
5454
</form>
5555

56+
<!--
57+
!!! Don't include the component data for now
58+
5659
<ul>
5760
5861
<li>.pvl</li>
@@ -391,7 +394,7 @@
391394
392395
393396
394-
397+
-->
395398

396399
<footer class="bg-white gray phm pvxl pvxxl-ns bt b--light-gray h-50">
397400
<small class="f5 mw7 db center lh-copy">

home.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ var css = fs.readFileSync('./css/tachyons.css', 'utf8')
219219

220220
//var ast = postcss.parse(css)
221221
var obj = cssstats(css)
222-
var size = filesize(gzip.sync(fs.readFileSync("css/tachyons.min.css", "utf8")))
222+
var size = filesize(gzip.sync(fs.readFileSync('css/tachyons.min.css', 'utf8')))
223223

224-
var template = fs.readFileSync('./templates/index.html', 'utf8')
224+
var template = fs.readFileSync('./src/templates/index.html', 'utf8')
225225
var tpl = _.template(template)
226226
var html = tpl({
227227
size: size,

readme.md

+2-2

components-build.js renamed to src/components-build.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@ var cssVariables = require('postcss-css-variables')
1515
var customMedia = require('postcss-custom-media')
1616
var mqPacker = require('css-mqpacker')
1717

18-
var tachyonsCss = fs.readFileSync('src/tachyons.css', 'utf8')
18+
var tachyonsCss = fs.readFileSync('src/css/tachyons.css', 'utf8')
1919

2020
module.exports = function () {
21-
glob('examples/components/src/**/*.html', {}, function (err, components) {
21+
glob('src/components/**/*.html', {}, function (err, components) {
2222
if (err) {
2323
console.error(err)
2424
return
2525
}
2626

27-
var template = fs.readFileSync('templates/components.html', 'utf8')
28-
27+
var template = fs.readFileSync('src/templates/components.html', 'utf8')
2928

3029
components.forEach(function (component) {
31-
var newDir = rmHtmlExt(component.replace('/src', '')) + '/index.html'
30+
var newDir = rmHtmlExt(component.replace('src/', 'examples/')) + '/index.html'
3231
var componentHtml = fs.readFileSync(component, 'utf8')
3332

3433
var fmParsed = fm.parse(componentHtml)
@@ -53,7 +52,7 @@ module.exports = function () {
5352
atImport(), cssVariables(), conditionals(), customMedia(), select(frontMatter.classes),
5453
removeComments(), mqPacker(), getModules()
5554
]).process(tachyonsCss, {
56-
from: 'src/tachyons.css'
55+
from: 'src/css/tachyons.css'
5756
}).css
5857

5958
// TODO: Update me once src/ uses the npm modules
@@ -68,6 +67,6 @@ module.exports = function () {
6867
}
6968

7069
function getTitle(component) {
71-
var title = rmHtmlExt(component).replace('examples/components/src/', '').replace(/(\/|_|-)/g, ' ')
70+
var title = rmHtmlExt(component).replace('src/components/', '').replace(/(\/|_|-)/g, ' ')
7271
return titleize(title)
7372
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

templates/components.html renamed to src/templates/components.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<body class="wi-100 sans-serif <%= bodyClass %>">
1313
<main>
1414
<%= content %>
15+
<!--
16+
!!! Don't include the component data for now
17+
1518
<ul>
1619
<% classes.map(renderClass) %>
1720
</ul>
@@ -28,7 +31,7 @@
2831
<% function renderModule(module) { %>
2932
<li><%= module %></li>
3033
<% } %>
31-
34+
-->
3235

3336
<footer class="bg-white gray phm pvxl pvxxl-ns bt b--light-gray h-50">
3437
<small class="f5 mw7 db center lh-copy">
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)