Skip to content

Commit 7d92725

Browse files
authored
Merge pull request #124 from rackerlabs/SURF-673-minified-assets
refactor(allthethings): refactor pipeline, fix linting, etc.
2 parents 671c052 + 0029905 commit 7d92725

40 files changed

+412
-411
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ before_script:
1616
- export DISPLAY=:99.0
1717
- sh -e /etc/init.d/xvfb start
1818
- jdk_switcher use oraclejdk8
19-
- yarn rollup
2019
- yarn start > /dev/null 2>&1 &
21-
- sleep 5
20+
- sleep 10
2221
script:
2322
- yarn test

README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,3 @@
66
0. [install test dependencies](https://github.com/rackerlabs/helix-ui/wiki/Testing#system-requirements)
77
0. `yarn install` to install project dependencies
88
0. `yarn start` to begin working
9-
10-
11-
### Key Files/Directories
12-
Path | Ship? | Notes
13-
----- | ----- | -----
14-
`source/bootstrap.helix.less` | Yes | Helix theme of Bootstrap 3
15-
`source/components/` | No | Source files for components and their documentation
16-
`source/docs.js` | No | Documentation functionality
17-
`source/docs.less` | No | Documentation styles
18-
`source/helix-ui.js` | Yes | HelixUI behaviors (including web component definitions)
19-
`source/helix-ui.less` | Yes | HelixUI styles
20-
`public/` | No | Generated output
21-
`source/_templates` | No | Component explorer layout templates
22-
23-
Changes within `source/_templates` or `source/_data` will require
24-
restarting the development server.
25-
26-
27-
## Publish Documentation
28-
```
29-
yarn run publish
30-
```

_config.js

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ CONFIG.root = path.resolve(__dirname);// absolute path to project directory
99
CONFIG.publicDir = 'public';
1010
CONFIG.sourceDir = 'src';
1111
CONFIG.docsDir = 'docs';
12-
CONFIG.templateDir = `${CONFIG.docsDir}/_templates`;
1312
CONFIG.testDir = 'test';
13+
CONFIG.distDir = 'dist';
1414

1515
// Component Explorer configuration
1616
// Used directly for "site" rendering context
@@ -30,43 +30,6 @@ CONFIG.less = {
3030
`${CONFIG.docsDir}/styles`,
3131
`${CONFIG.sourceDir}/helix-ui/styles`
3232
],
33-
// [src, dest]
34-
files: [
35-
[ `${CONFIG.sourceDir}/helix-ui.less`, 'dist/helix-ui.css' ],
36-
[ `${CONFIG.docsDir}/docs.less`, 'public/docs.css' ],
37-
],
38-
};
39-
40-
// TODO: move to lib/webpack.js
41-
// Configuration for the webpack build tool
42-
CONFIG.webpack = {
43-
entry: `${CONFIG.root}/${CONFIG.docsDir}/docs.js`,
44-
output: {
45-
path: path.resolve(__dirname, 'public'),
46-
filename: 'docs.js',
47-
}
48-
};
49-
50-
// Configuration for generating static documentation
51-
CONFIG.docs = {
52-
files: [
53-
'*.html',
54-
'**/*.html',
55-
],
56-
// settings for deployment to github pages
57-
ghPages: {
58-
type: 'git',
59-
repo: '[email protected]:rackerlabs/helix-ui.git',
60-
branch: 'gh-pages',
61-
message: `Docs Updated: {{ now('YYYY-MM-DD HH:mm:ss') }}`,
62-
url: 'https://rackerlabs.github.io/helix-ui'
63-
}
64-
};
65-
66-
// Files and directories to copy to publicDir
67-
// All paths are relative to {CONFIG.sourceDir}
68-
CONFIG.copy = {
69-
dirs: [ 'images' ]
7033
};
7134

7235
/* Define Exports */

bin/build.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

bin/clean.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

bin/cleanPublic.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const CONFIG = require('../_config');
5+
const { remove } = require('fs-extra');
6+
7+
(async function () {
8+
await remove(CONFIG.publicDir);
9+
})();

bin/compile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const { compileAll } = require('../lib/compile');
5+
6+
(function () {
7+
compileAll();
8+
})();

bin/copy.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

bin/generate.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const { generateAll } = require('../lib/generate');
5+
const { copyDocs, copyDist } = require('../lib/copy');
6+
7+
(function () {
8+
copyDist();
9+
copyDocs();
10+
generateAll();
11+
})();

bin/ghpages.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const { publishDocs } = require('../lib/publish');
5+
6+
(async function () {
7+
await publishDocs();
8+
})();

0 commit comments

Comments
 (0)