-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1da07b
commit a24c46b
Showing
5 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Claudio Holanda | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Fastcoin official documentation repository | ||
|
||
---- | ||
|
||
## How to contribute: | ||
|
||
There are two ways to contribute to Fastcoin Docs: Directly via Github website, or by running it locally. Follow the guide that better fits your needs (and knowledge). | ||
|
||
#### Directly via Github: | ||
|
||
1. Edit any of the [docs files](https://github.com/fastcoin-project/docs/tree/master/app/assets/docs); | ||
2. Submit a Pull Request with your changes. | ||
|
||
#### Developing locally: | ||
|
||
Make sure you have Node.js installed. If you don't, [**please follow this guide**](https://gist.github.com/kazzkiq/fe702215173e795d49d0c1ffbea363b5). | ||
|
||
1. Clone this repo: `git clone https://github.com/fastcoin-project/docs.git`; | ||
2. Inside the cloned folder, run: `npm i -g brunch && npm i`; (skip the first command if you already have `brunch` installed); | ||
3. Run: `npm start`. | ||
4. Access http://localhost:3333/ in your browser. | ||
|
||
Any changes in the project (both on docs and/or code) will be reflect automatically in the browser once you refresh it. | ||
|
||
#### Deploying a public test version: | ||
|
||
1. In your local project, run: `npm run deploy`. | ||
2. Access your changes at: https://fastcoin.github.io/docs/ | ||
|
||
**Note: fastcoin.github.io/docs/ is a test version of the docs, and thus shouldn't be shared openly as the production documentation website.** | ||
|
||
#### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "fastcoin-doc", | ||
"description": "Fastcoin documentation", | ||
"author": "Fastcoin", | ||
"version": "0.1.1", | ||
"repository": "https://github.com/fastcoin-project/docs.git", | ||
"scripts": { | ||
"start": "brunch watch --server -n", | ||
"build": "echo 'Generating production optimized code, this may take a while...\n' && brunch build --production && echo 'You can find your production files at /public folder.\n\n'", | ||
"build:docs": "node task-build-docs.js", | ||
"deploy": "npm run build && npm run build:docs && cp CNAME public && node task-deploy.js" | ||
}, | ||
"dependencies": { | ||
"@fdaciuk/ajax": "^2.1.5", | ||
"fuse.js": "^3.0.5", | ||
"hammerjs": "^2.0.8", | ||
"install": "^0.10.1", | ||
"marked": "^0.3.19", | ||
"npm": "^6.13.7", | ||
"prismjs": "^1.6.0" | ||
}, | ||
"devDependencies": { | ||
"after-brunch": "0.0.5", | ||
"auto-reload-brunch": "^2", | ||
"autoprefixer": "^7.0.1", | ||
"babel-brunch": "^6.1.1", | ||
"babel-preset-latest": "^6.24.1", | ||
"brunch": "^2.9.0", | ||
"clean-css-brunch": "^2", | ||
"closure-compiler-brunch": "^0.1.4", | ||
"cssnano-brunch": "^1.1.8", | ||
"gh-pages": "^1.0.0", | ||
"postcss-brunch": "^2.0.5", | ||
"rimraf": "^2.6.1", | ||
"sass-brunch": "^2.10.4", | ||
"svelte-brunch": "^0.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const fs = require('fs'); | ||
const rimraf = require('rimraf'); | ||
|
||
const DOCS_PATH = 'app/assets/docs'; | ||
const PUBLIC_PATH = 'public'; | ||
|
||
let files = fs.readdirSync(DOCS_PATH); | ||
let filesContent = []; | ||
|
||
// Save list of filenames (only those who ends in .md) | ||
files | ||
.filter(file => file.indexOf('.md') > -1) | ||
.forEach(file => filesContent.push(fs.readFileSync(`${DOCS_PATH}/${file}`))); | ||
|
||
// Concat files and write to PUBLIC folder | ||
fs.writeFileSync(PUBLIC_PATH + '/documentation.md', filesContent.join('\n\n')); | ||
|
||
// Freeing memory | ||
delete files; | ||
files = null; | ||
|
||
delete filesContent; | ||
filesContent = null; | ||
|
||
// Delete unused /docs from PUBLIC folder | ||
rimraf(`${PUBLIC_PATH}/docs`, () => { console.log('\x1b[35mHerodotus:\x1b[0m Documentation compiling finished.') }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const ghpages = require('gh-pages'); | ||
const path = require('path'); | ||
|
||
ghpages.publish('public', err => { | ||
if(err) { | ||
console.log('Error while trying to deploy the docs to gh-pages:'); | ||
console.log(err); | ||
} else { | ||
console.log('\x1b[35mStatus:\x1b[0m Deployed.'); | ||
} | ||
}); |