diff --git a/.esdoc.json b/.esdoc.json index 6432de0..6dcc286 100644 --- a/.esdoc.json +++ b/.esdoc.json @@ -1,4 +1,4 @@ { "source": "./src/commands", - "destination": "./apidocs" + "destination": "./docs/api" } diff --git a/.gitignore b/.gitignore index 6ad53d1..2e1f033 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,16 @@ # Project /bin -lib +libs coverage node_modules +# Documentation Jekyll +_site +.sass-cache +.jekyll-metadata +Gemfile +Gemfile.lock + # Logs & System *.log *.pid diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000..e8f2c7a --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +squarebox.nahuel.io diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs/index.html @@ -0,0 +1 @@ + diff --git a/package.json b/package.json index 7ac680d..04be51c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ "it": "_mocha --opts mocha.opts test/integration", "coverage": "istanbul cover ./node_modules/.bin/_mocha -- --opts mocha.opts test/commands", "coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls", - "docs": "esdoc", + "build:docs": "cd ./src/docs && npm run build", + "dev:docs": "cd ./src/docs && npm run serve", + "apidocs": "esdoc", "build": "node register" }, "files": [ diff --git a/src/docs/.babelrc b/src/docs/.babelrc new file mode 100644 index 0000000..cdfbe62 --- /dev/null +++ b/src/docs/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["react", "es2015", "stage-2"] +} diff --git a/src/docs/.bowerrc b/src/docs/.bowerrc new file mode 100644 index 0000000..ff0ad1a --- /dev/null +++ b/src/docs/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "js/libs" +} diff --git a/src/docs/.nojekyll b/src/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/src/docs/CNAME b/src/docs/CNAME new file mode 100644 index 0000000..e8f2c7a --- /dev/null +++ b/src/docs/CNAME @@ -0,0 +1 @@ +squarebox.nahuel.io diff --git a/src/docs/README.md b/src/docs/README.md new file mode 100644 index 0000000..ba7c437 --- /dev/null +++ b/src/docs/README.md @@ -0,0 +1,3 @@ +### Squarebox Documentation + +Official Documentation [here](http://squarebox.nahuel.io) diff --git a/src/docs/_config.yml b/src/docs/_config.yml new file mode 100644 index 0000000..1452acc --- /dev/null +++ b/src/docs/_config.yml @@ -0,0 +1,26 @@ +# Squarebox Jekyll Configuration +source: "." +destination: "../../docs" +title: Squarebox - Nahuel IO +email: 3dimentionar@gmail.com +description: "Squarebox Module Bundler for ES6 - Official Documentation" +baseurl: "" +url: "http://squarebox.nahuel.io/" +twitter_username: squarebox +github_username: nahuelio/squarebox + +# Build settings +markdown: kramdown +include: + - .nojekyll +exclude: + - package.json + - README.md + - .bowerrc + - js + - build.config.js + - bower.json + - .babelrc + - node_modules + - Gemfile + - Gemfile.lock diff --git a/src/docs/bower.json b/src/docs/bower.json new file mode 100644 index 0000000..3b6d12e --- /dev/null +++ b/src/docs/bower.json @@ -0,0 +1,37 @@ +{ + "name": "squarebox-docs", + "description": "SquareBox Documentation", + "authors": [ + "Patricio Ferreira <3dimentionar@gmail.com>" + ], + "license": "MIT", + "keywords": [ + "squarebox", + "documentation", + "guides" + ], + "homepage": "https://github.com/nahuelio/squarebox", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "bootstrap": "3.3.7", + "font-awesome": "4.7.0", + "immutable": "3.8.1", + "react": "15.4.2", + "react-redux": "https://cdnjs.cloudflare.com/ajax/libs/react-redux/5.0.3/react-redux.min.js", + "redux": "3.6.0", + "redux-saga": "https://cdnjs.cloudflare.com/ajax/libs/redux-saga/0.14.3/redux-saga.min.js", + "redux-logger": "*", + "requirejs": "2.3.3", + "text": "requirejs-text#^2.0.15", + "require-css": "0.1.10", + "lodash": "4.17.4", + "babel-polyfill": "^0.0.1" + } +} diff --git a/src/docs/build.config.js b/src/docs/build.config.js new file mode 100644 index 0000000..fbd11f2 --- /dev/null +++ b/src/docs/build.config.js @@ -0,0 +1,45 @@ +/** +* RequireJS Build Profile +* @author Patricio Ferreira <3dimentionar@gmail.com> +**/ +const path = require('path'); + +const basic = { + baseUrl: './js', + mainConfigFile: './js/config.js', + bundlesConfigOutFile: './js/config.js', + appDir: '.', + dir: '../../docs/js', + fileExclusionRegExp: "^\\.|\\.less$|\\.md$", + findNestedDependencies: true, + removeCombined: true, + optimize: 'uglify', + optimizeCss: 'none', + logLevel: 3, + uglify: { + toplevel: true, + ascii_only: true, + beautify: false, + max_line_length: 1000, + no_mangle: false + } +}; + +module.exports = Object.assign({ + + paths: { + 'boostrap-css': 'empty:', + 'font-awesome': 'empty:' + }, + + onBuildRead: function(moduleName, path, contents) { + return contents; + }, + + onBuildWrite: function(moduleName, path, contents) { + return contents; + }, + + modules: {} + +}, basic); diff --git a/src/docs/index.md b/src/docs/index.md new file mode 100644 index 0000000..e4d427d --- /dev/null +++ b/src/docs/index.md @@ -0,0 +1,3 @@ +--- +layout: home +--- diff --git a/src/docs/js/config.js b/src/docs/js/config.js new file mode 100644 index 0000000..c570821 --- /dev/null +++ b/src/docs/js/config.js @@ -0,0 +1,44 @@ +/** +* RequireJS Configuration +* @author Patricio Ferreira <3dimentionar@gmail.com> +**/ +'use strict'; + +requirejs.config({ + + baseUrl: '.', + + paths: { + react: 'libs/react/dist/react.min', + 'react-dom': 'libs/react/dist/react-dom.min', + 'react-redux': 'libs/react-redux/index', + redux: 'libs/redux/index', + 'redux-saga': 'libs/react-saga/index', + 'redux-logger': 'libs/react-logger/redux-logger', + 'immutable': 'libs/immutable/dist/immutable.min', + + 'babel-helpers': 'libs/babel/helpers', + 'babel-polyfill': 'libs/babel-polyfill/browser-polyfill', + + bootstrap: 'libs/bootstrap/dist/js/bootstrap.min', + jquery: 'libs/jquery/dist/jquery.min', + lodash: 'libs/lodash/dist/lodash.min', + css: 'libs/require-css/css.min', + text: 'libs/text/text', + + 'font-awesome': 'libs/font-awesome/css/font-awesome.min.css', + 'bootstrap-css': 'libs/bootstrap/dist/css/bootstrap.min.css' + }, + + shim: { + lodash: ['babel-helpers', 'babel-polyfill'], + jquery: ['lodash'], + bootstrap: ['jquery'], + 'react-dom': ['react'] + } + +}).onError(function(err) { + + console.log(err); + +}); diff --git a/src/docs/package.json b/src/docs/package.json new file mode 100644 index 0000000..4fad3f3 --- /dev/null +++ b/src/docs/package.json @@ -0,0 +1,35 @@ +{ + "name": "squarebox-docs", + "version": "1.0.0", + "description": "SquareBox Documentation", + "private": "true", + "scripts": { + "compile": "r_js -o build.config.js", + "build": "jekyll build && npm run compile", + "serve": "npm run build && jekyll serve" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/nahuelio/squarebox.git" + }, + "keywords": [ + "squarebox", + "documentation", + "guides" + ], + "author": "Patricio Ferreira <3dimentionar@gmail.com>", + "license": "MIT", + "bugs": { + "url": "https://github.com/nahuelio/squarebox/issues" + }, + "homepage": "https://github.com/nahuelio/squarebox#readme", + "devDependencies": { + "babel-cli": "6.23.0", + "babel-polyfill": "6.23.0", + "babel-preset-es2015": "6.22.0", + "babel-preset-react": "6.23.0", + "babel-preset-stage-2": "6.22.0", + "bower": "1.8.0", + "glob": "7.1.1" + } +}