Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[added] postpublish hook that automatically pushes the generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thealjey committed Oct 9, 2015
1 parent 9bee23b commit 15d1079
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 10 deletions.
5 changes: 5 additions & 0 deletions README.docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Webcompiler Documentation Website
*JSDoc generated API documentation site.*

[Project Home](https://github.com/thealjey/webcompiler)
[API Docs](https://thealjey.github.io/webcompiler)
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
*Lint, type-check, compile, package and gzip JavaScript (ES6 + Flow static types + JSX), for the browser as well as
NodeJS; lint, compile, auto-prefix, minify and gzip SASS.*

[Project Home](https://github.com/thealjey/webcompiler)
[API Docs](https://thealjey.github.io/webcompiler)

[![Build Status](https://travis-ci.org/thealjey/webcompiler.svg?branch=master)](https://travis-ci.org/thealjey/webcompiler)
[![Coverage Status](https://coveralls.io/repos/thealjey/webcompiler/badge.svg?branch=master&service=github)](https://coveralls.io/github/thealjey/webcompiler?branch=master)
[![Code Climate](https://codeclimate.com/github/thealjey/webcompiler/badges/gpa.svg)](https://codeclimate.com/github/thealjey/webcompiler)
Expand Down Expand Up @@ -40,11 +43,6 @@ suppress_comment=.*@noflow.*
npm i webcompiler --save
```

### API Documentation

To get better acquainted with the available tools feel free to skim through the auto-generated
[API Docs](https://rawgit.com/thealjey/webcompiler/master/docs/index.html).

### Exposes 2 main classes

`JS` - lints, type-checks, compiles, packages, minifies and gzips JavaScript for the browser and NodeJS
Expand Down
3 changes: 3 additions & 0 deletions bin/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* @flow */

import {join} from 'path';
import {createReadStream, createWriteStream} from 'fs';
import JS from '../lib/JS';
import NativeProcess from '../lib/NativeProcess';

Expand All @@ -20,6 +21,8 @@ js.beDir(libDir, buildDir, function () {
if (jsdocErr) {
return console.error(jsdocErr);
}
createReadStream(join(rootDir, 'LICENSE')).pipe(createWriteStream(join(docsDir, 'LICENSE')));
createReadStream(join(rootDir, 'README.docs.md')).pipe(createWriteStream(join(docsDir, 'README.md')));
console.log('\x1b[32mGenerated API documentation!\x1b[0m');
npm.run(Function.prototype, ['test'], {stdio: 'inherit'});
}, [buildDir, '-d', docsDir, '-R', readme, '-c', jsdocConfig]);
Expand Down
22 changes: 22 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 Eugene Kuzmenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Webcompiler Documentation Website
*JSDoc generated API documentation site.*

[Project Home](https://github.com/thealjey/webcompiler)
[API Docs](https://thealjey.github.io/webcompiler)
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ <h3> </h3>
<section>
<article><h1>webcompiler</h1><p><em>Lint, type-check, compile, package and gzip JavaScript (ES6 + Flow static types + JSX), for the browser as well as
NodeJS; lint, compile, auto-prefix, minify and gzip SASS.</em></p>
<p><a href="https://github.com/thealjey/webcompiler">Project Home</a>
<a href="https://thealjey.github.io/webcompiler">API Docs</a></p>
<p><a href="https://travis-ci.org/thealjey/webcompiler"><img src="https://travis-ci.org/thealjey/webcompiler.svg?branch=master" alt="Build Status"></a>
<a href="https://coveralls.io/github/thealjey/webcompiler?branch=master"><img src="https://coveralls.io/repos/thealjey/webcompiler/badge.svg?branch=master&amp;service=github" alt="Coverage Status"></a>
<a href="https://codeclimate.com/github/thealjey/webcompiler"><img src="https://codeclimate.com/github/thealjey/webcompiler/badges/gpa.svg" alt="Code Climate"></a>
Expand All @@ -70,9 +72,7 @@ <h3>Prerequisites</h3><ol>
[libs]

[options]
suppress_comment=.*@noflow.*</code></pre><h3>Installation</h3><pre class="prettyprint source"><code>npm i webcompiler --save</code></pre><h3>API Documentation</h3><p>To get better acquainted with the available tools feel free to skim through the auto-generated
<a href="https://rawgit.com/thealjey/webcompiler/master/docs/index.html">API Docs</a>.</p>
<h3>Exposes 2 main classes</h3><p><code>JS</code> - lints, type-checks, compiles, packages, minifies and gzips JavaScript for the browser and NodeJS</p>
suppress_comment=.*@noflow.*</code></pre><h3>Installation</h3><pre class="prettyprint source"><code>npm i webcompiler --save</code></pre><h3>Exposes 2 main classes</h3><p><code>JS</code> - lints, type-checks, compiles, packages, minifies and gzips JavaScript for the browser and NodeJS</p>
<pre class="prettyprint source"><code>interface JS {
constructor(lintRules: Object = {});
validate(inPath: string, lintPaths: Array&lt;string>, callback: Function);
Expand Down
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@
"test": "babel-istanbul cover --root lib --print detail --include-all-sources --include-babel-polyfill jasmine",
"lint": "eslint ./",
"build": "babel-node bin/build",
"release": "release"
"release": "release",
"postpublish": "git subtree push --prefix docs origin gh-pages"
},
"repository": {
"type": "git",
"url": "git+https://github.com/thealjey/webcompiler.git"
},
"files": [
"LICENSE",
"README.md",
"CHANGELOG.md",
"build",
"config"
],
"keywords": [
"lint",
"typecheck",
Expand All @@ -33,7 +41,7 @@
"bugs": {
"url": "https://github.com/thealjey/webcompiler/issues"
},
"homepage": "https://github.com/thealjey/webcompiler#readme",
"homepage": "https://thealjey.github.io/webcompiler",
"dependencies": {
"autoprefixer": "^6.0.3",
"babel": "^5.8.23",
Expand Down

0 comments on commit 15d1079

Please sign in to comment.