diff --git a/README.docs.md b/README.docs.md
new file mode 100644
index 0000000..5b3992f
--- /dev/null
+++ b/README.docs.md
@@ -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)
diff --git a/README.md b/README.md
index e668261..98d8edb 100644
--- a/README.md
+++ b/README.md
@@ -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)
@@ -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
diff --git a/bin/build.js b/bin/build.js
index 2cc4577..f8f6bb0 100644
--- a/bin/build.js
+++ b/bin/build.js
@@ -1,6 +1,7 @@
/* @flow */
import {join} from 'path';
+import {createReadStream, createWriteStream} from 'fs';
import JS from '../lib/JS';
import NativeProcess from '../lib/NativeProcess';
@@ -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]);
diff --git a/docs/LICENSE b/docs/LICENSE
new file mode 100644
index 0000000..c1f0f8b
--- /dev/null
+++ b/docs/LICENSE
@@ -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.
+
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..5b3992f
--- /dev/null
+++ b/docs/README.md
@@ -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)
diff --git a/docs/index.html b/docs/index.html
index 0c528ca..46e7a88 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -45,6 +45,8 @@
webcompiler
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
+API Docs
@@ -70,9 +72,7 @@
Prerequisites
[libs]
[options]
-suppress_comment=.*@noflow.*Installation
npm i webcompiler --save
API Documentation
To get better acquainted with the available tools feel free to skim through the auto-generated
-API Docs.
-Exposes 2 main classes
JS
- lints, type-checks, compiles, packages, minifies and gzips JavaScript for the browser and NodeJS
+suppress_comment=.*@noflow.*Installation
npm i webcompiler --save
Exposes 2 main classes
JS
- lints, type-checks, compiles, packages, minifies and gzips JavaScript for the browser and NodeJS
interface JS {
constructor(lintRules: Object = {});
validate(inPath: string, lintPaths: Array<string>, callback: Function);
diff --git a/package.json b/package.json
index 2fe9c50..972ed05 100644
--- a/package.json
+++ b/package.json
@@ -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",
@@ -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",