From bd2d6c5fca37696e20ee41f8560ccb1e88b11193 Mon Sep 17 00:00:00 2001 From: kuakman <3dimentionar@gmail.com> Date: Mon, 27 Feb 2017 18:15:29 -0800 Subject: [PATCH 1/4] documentation: checkpoint - Added jekyll initial setup for documentation site. --- src/docs/.gitignore | 6 ++++ src/docs/.nojekyll | 0 src/docs/CNAME | 1 + src/docs/README.md | 3 ++ src/docs/_config.yml | 34 +++++++++++++++++++ .../2017-02-26-welcome-to-jekyll.markdown | 25 ++++++++++++++ src/docs/about.md | 15 ++++++++ src/docs/index.md | 6 ++++ src/docs/package.json | 24 +++++++++++++ 9 files changed, 114 insertions(+) create mode 100644 src/docs/.gitignore create mode 100644 src/docs/.nojekyll create mode 100644 src/docs/CNAME create mode 100644 src/docs/README.md create mode 100644 src/docs/_config.yml create mode 100644 src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown create mode 100644 src/docs/about.md create mode 100644 src/docs/index.md create mode 100644 src/docs/package.json diff --git a/src/docs/.gitignore b/src/docs/.gitignore new file mode 100644 index 0000000..8c3e4c6 --- /dev/null +++ b/src/docs/.gitignore @@ -0,0 +1,6 @@ +_site +.sass-cache +.jekyll-metadata +node_modules/ +Gemfile +Gemfile.lock 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..f5df983 --- /dev/null +++ b/src/docs/_config.yml @@ -0,0 +1,34 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely edit after that. If you find +# yourself editing this file very often, consider using Jekyll's data files +# feature for the data you need to update frequently. +# +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'bundle exec jekyll serve'. If you change this file, please restart the server process. + +# Site settings +# These are used to personalize your new site. If you look in the HTML files, +# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. +# You can create any custom variable you would like, and they will be accessible +# in the templates via {{ site.myvariable }}. +title: Your awesome title +email: your-email@domain.com +description: > # this means to ignore newlines until "baseurl:" + Write an awesome description for your new site here. You can edit this + line in _config.yml. It will appear in your document head meta (for + Google search results) and in your feed.xml site description. +baseurl: "" # the subpath of your site, e.g. /blog +url: "" # the base hostname & protocol for your site, e.g. http://example.com +twitter_username: jekyllrb +github_username: jekyll + +# Build settings +markdown: kramdown +theme: minima +gems: + - jekyll-feed +exclude: + - Gemfile + - Gemfile.lock diff --git a/src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown b/src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown new file mode 100644 index 0000000..6923e8d --- /dev/null +++ b/src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown @@ -0,0 +1,25 @@ +--- +layout: post +title: "Welcome to Jekyll!" +date: 2017-02-26 17:51:37 -0800 +categories: jekyll update +--- +You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. + +To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. + +Jekyll also offers powerful support for code snippets: + +{% highlight ruby %} +def print_hi(name) + puts "Hi, #{name}" +end +print_hi('Tom') +#=> prints 'Hi, Tom' to STDOUT. +{% endhighlight %} + +Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. + +[jekyll-docs]: https://jekyllrb.com/docs/home +[jekyll-gh]: https://github.com/jekyll/jekyll +[jekyll-talk]: https://talk.jekyllrb.com/ diff --git a/src/docs/about.md b/src/docs/about.md new file mode 100644 index 0000000..d441cde --- /dev/null +++ b/src/docs/about.md @@ -0,0 +1,15 @@ +--- +layout: page +title: About +permalink: /about/ +--- + +This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) + +You can find the source code for the Jekyll new theme at: +{% include icon-github.html username="jekyll" %} / +[minima](https://github.com/jekyll/minima) + +You can find the source code for Jekyll at +{% include icon-github.html username="jekyll" %} / +[jekyll](https://github.com/jekyll/jekyll) diff --git a/src/docs/index.md b/src/docs/index.md new file mode 100644 index 0000000..1eb5d67 --- /dev/null +++ b/src/docs/index.md @@ -0,0 +1,6 @@ +--- +# You don't need to edit this file, it's empty on purpose. +# Edit theme's home layout instead if you wanna make some changes +# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults +layout: home +--- diff --git a/src/docs/package.json b/src/docs/package.json new file mode 100644 index 0000000..8feef55 --- /dev/null +++ b/src/docs/package.json @@ -0,0 +1,24 @@ +{ + "name": "squarebox-docs", + "version": "1.0.0", + "description": "SquareBox Documentation", + "scripts": { + "build": "jekyll build", + "serve": "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" +} From c601789668d277334aa2a24668c3fe6c81ead707 Mon Sep 17 00:00:00 2001 From: kuakman <3dimentionar@gmail.com> Date: Tue, 28 Feb 2017 10:06:05 -0800 Subject: [PATCH 2/4] documentation: checkpoint - setup initial gulp and frontend libraries. --- .gitignore | 7 +++ docs/.nojekyll | 0 docs/CNAME | 1 + docs/index.html | 1 + package.json | 4 +- src/docs/.babelrc | 3 + src/docs/.gitignore | 6 -- src/docs/_config.yml | 45 ++++++-------- .../2017-02-26-welcome-to-jekyll.markdown | 25 -------- src/docs/about.md | 15 ----- src/docs/gulpfile.js | 59 +++++++++++++++++++ src/docs/package.json | 39 +++++++++++- 12 files changed, 127 insertions(+), 78 deletions(-) create mode 100644 docs/.nojekyll create mode 100644 docs/CNAME create mode 100644 docs/index.html create mode 100644 src/docs/.babelrc delete mode 100644 src/docs/.gitignore delete mode 100644 src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown delete mode 100644 src/docs/about.md create mode 100644 src/docs/gulpfile.js diff --git a/.gitignore b/.gitignore index 6ad53d1..df88554 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,13 @@ lib 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..43380d4 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": "jekyll build --config ./src/docs/_config.yml", + "dev-docs": "jekyll serve --config ./src/docs/_config.yml", + "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/.gitignore b/src/docs/.gitignore deleted file mode 100644 index 8c3e4c6..0000000 --- a/src/docs/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -_site -.sass-cache -.jekyll-metadata -node_modules/ -Gemfile -Gemfile.lock diff --git a/src/docs/_config.yml b/src/docs/_config.yml index f5df983..cc06aa0 100644 --- a/src/docs/_config.yml +++ b/src/docs/_config.yml @@ -1,34 +1,23 @@ -# Welcome to Jekyll! -# -# This config file is meant for settings that affect your whole blog, values -# which you are expected to set up once and rarely edit after that. If you find -# yourself editing this file very often, consider using Jekyll's data files -# feature for the data you need to update frequently. -# -# For technical reasons, this file is *NOT* reloaded automatically when you use -# 'bundle exec jekyll serve'. If you change this file, please restart the server process. - -# Site settings -# These are used to personalize your new site. If you look in the HTML files, -# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. -# You can create any custom variable you would like, and they will be accessible -# in the templates via {{ site.myvariable }}. -title: Your awesome title -email: your-email@domain.com -description: > # this means to ignore newlines until "baseurl:" - Write an awesome description for your new site here. You can edit this - line in _config.yml. It will appear in your document head meta (for - Google search results) and in your feed.xml site description. -baseurl: "" # the subpath of your site, e.g. /blog -url: "" # the base hostname & protocol for your site, e.g. http://example.com -twitter_username: jekyllrb -github_username: jekyll +# Squarebox Jekyll Configuration +source: "./src/docs" +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 -theme: minima -gems: - - jekyll-feed +include: + - .nojekyll exclude: + - package.json + - README.md + - .babelrc + - gulpfile.js + - node_modules - Gemfile - Gemfile.lock diff --git a/src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown b/src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown deleted file mode 100644 index 6923e8d..0000000 --- a/src/docs/_posts/2017-02-26-welcome-to-jekyll.markdown +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: post -title: "Welcome to Jekyll!" -date: 2017-02-26 17:51:37 -0800 -categories: jekyll update ---- -You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. - -To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. - -Jekyll also offers powerful support for code snippets: - -{% highlight ruby %} -def print_hi(name) - puts "Hi, #{name}" -end -print_hi('Tom') -#=> prints 'Hi, Tom' to STDOUT. -{% endhighlight %} - -Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. - -[jekyll-docs]: https://jekyllrb.com/docs/home -[jekyll-gh]: https://github.com/jekyll/jekyll -[jekyll-talk]: https://talk.jekyllrb.com/ diff --git a/src/docs/about.md b/src/docs/about.md deleted file mode 100644 index d441cde..0000000 --- a/src/docs/about.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -layout: page -title: About -permalink: /about/ ---- - -This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) - -You can find the source code for the Jekyll new theme at: -{% include icon-github.html username="jekyll" %} / -[minima](https://github.com/jekyll/minima) - -You can find the source code for Jekyll at -{% include icon-github.html username="jekyll" %} / -[jekyll](https://github.com/jekyll/jekyll) diff --git a/src/docs/gulpfile.js b/src/docs/gulpfile.js new file mode 100644 index 0000000..295829d --- /dev/null +++ b/src/docs/gulpfile.js @@ -0,0 +1,59 @@ +/** +* Gulp Tasks +* @author Patricio Ferreira <3dimentionar@gmail.com> +**/ +const fs = require('fs-extra'); + gulp = require('gulp'), + gulpsync = require('gulp-sync')(gulp); + babel = require('gulp-babel'), + less = require('gulp-less'), + externalHelpers = require('gulp-babel-external-helpers'), + install = require('gulp-install'), + requirejs = require('gulp-requirejs'); + +/** +* Gulp Clean +* @async +**/ +gulp.task('clean', (callback) => { + // TODO + callback(); +}); + + +/** +* Gulp Install Dependencies +* @async +* @uses gulp.task.clean +**/ +gulp.task('install', gulpsync.async(['clean'], 'clean'), (callback) => { + // TODO + callback(); +}); + +/** +* Gulp Compile +* @async +* @uses gulp.task.install +**/ +gulp.task('compile', gulpsync.async(['install'], 'install'), (callback) => { + // TODO + callback(); +}); + +/** +* Gulp Build +* @async +* @uses gulp.task.compile +**/ +gulp.task('build', gulpsync.async(['compile'], 'compile'), (callback) => { + // TODO + callback(); +}); + +/** +* Gulp Default +* @async +* @uses gulp.task.build +**/ +gulp.task('default', gulpsync.async(['build'], 'build')); diff --git a/src/docs/package.json b/src/docs/package.json index 8feef55..f59826f 100644 --- a/src/docs/package.json +++ b/src/docs/package.json @@ -2,9 +2,11 @@ "name": "squarebox-docs", "version": "1.0.0", "description": "SquareBox Documentation", + "private": "true", "scripts": { - "build": "jekyll build", - "serve": "jekyll serve" + "compile": "gulp", + "build": "npm run compile && jekyll build", + "serve": "npm run build && jekyll serve" }, "repository": { "type": "git", @@ -20,5 +22,36 @@ "bugs": { "url": "https://github.com/nahuelio/squarebox/issues" }, - "homepage": "https://github.com/nahuelio/squarebox#readme" + "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", + "fs-extra": "^2.0.0", + "gulp": "3.9.1", + "gulp-babel": "6.1.2", + "gulp-babel-external-helpers": "2.0.2", + "gulp-install": "0.6.0", + "gulp-less": "3.3.0", + "gulp-requirejs": "1.0.0-rc1", + "gulp-sync": "0.1.4" + }, + "dependencies": { + "bootstrap": "3.3.7", + "font-awesome": "4.7.0", + "immutable": "3.8.1", + "jquery": "3.1.1", + "lodash": "4.17.4", + "react": "15.4.2", + "react-dom": "15.4.2", + "react-redux": "5.0.3", + "redux": "3.6.0", + "redux-logger": "2.8.1", + "redux-saga": "0.14.3", + "require-css": "0.1.10", + "requirejs": "2.3.3", + "requirejs-text": "2.0.15" + } } From 620de2ac04218737b394ce4ae3665ec6d474ce0e Mon Sep 17 00:00:00 2001 From: kuakman <3dimentionar@gmail.com> Date: Tue, 28 Feb 2017 10:22:12 -0800 Subject: [PATCH 3/4] documentation: checkpoint - Fixed docs path generation and npm run scripts. --- .esdoc.json | 2 +- package.json | 4 ++-- src/docs/_config.yml | 4 ++-- src/docs/index.md | 3 --- 4 files changed, 5 insertions(+), 8 deletions(-) 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/package.json b/package.json index 43380d4..04be51c 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "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", - "build-docs": "jekyll build --config ./src/docs/_config.yml", - "dev-docs": "jekyll serve --config ./src/docs/_config.yml", + "build:docs": "cd ./src/docs && npm run build", + "dev:docs": "cd ./src/docs && npm run serve", "apidocs": "esdoc", "build": "node register" }, diff --git a/src/docs/_config.yml b/src/docs/_config.yml index cc06aa0..dbf8214 100644 --- a/src/docs/_config.yml +++ b/src/docs/_config.yml @@ -1,6 +1,6 @@ # Squarebox Jekyll Configuration -source: "./src/docs" -destination: "./docs" +source: "." +destination: "../../docs" title: Squarebox - Nahuel IO email: 3dimentionar@gmail.com description: "Squarebox Module Bundler for ES6 - Official Documentation" diff --git a/src/docs/index.md b/src/docs/index.md index 1eb5d67..e4d427d 100644 --- a/src/docs/index.md +++ b/src/docs/index.md @@ -1,6 +1,3 @@ --- -# You don't need to edit this file, it's empty on purpose. -# Edit theme's home layout instead if you wanna make some changes -# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults layout: home --- From aa03210b385a887fbadcbe2f4ff4ce3a34b61f6d Mon Sep 17 00:00:00 2001 From: kuakman <3dimentionar@gmail.com> Date: Wed, 1 Mar 2017 08:44:32 -0800 Subject: [PATCH 4/4] documentation: checkpoint - Added bower to manage documentation front end dependencies. Trying requirejs as a bundler. --- .gitignore | 2 +- src/docs/.bowerrc | 3 ++ src/docs/_config.yml | 5 +++- src/docs/bower.json | 37 +++++++++++++++++++++++++ src/docs/build.config.js | 45 ++++++++++++++++++++++++++++++ src/docs/gulpfile.js | 59 ---------------------------------------- src/docs/js/config.js | 44 ++++++++++++++++++++++++++++++ src/docs/package.json | 30 +++----------------- 8 files changed, 138 insertions(+), 87 deletions(-) create mode 100644 src/docs/.bowerrc create mode 100644 src/docs/bower.json create mode 100644 src/docs/build.config.js delete mode 100644 src/docs/gulpfile.js create mode 100644 src/docs/js/config.js diff --git a/.gitignore b/.gitignore index df88554..2e1f033 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Project /bin -lib +libs coverage node_modules 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/_config.yml b/src/docs/_config.yml index dbf8214..1452acc 100644 --- a/src/docs/_config.yml +++ b/src/docs/_config.yml @@ -16,8 +16,11 @@ include: exclude: - package.json - README.md + - .bowerrc + - js + - build.config.js + - bower.json - .babelrc - - gulpfile.js - 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/gulpfile.js b/src/docs/gulpfile.js deleted file mode 100644 index 295829d..0000000 --- a/src/docs/gulpfile.js +++ /dev/null @@ -1,59 +0,0 @@ -/** -* Gulp Tasks -* @author Patricio Ferreira <3dimentionar@gmail.com> -**/ -const fs = require('fs-extra'); - gulp = require('gulp'), - gulpsync = require('gulp-sync')(gulp); - babel = require('gulp-babel'), - less = require('gulp-less'), - externalHelpers = require('gulp-babel-external-helpers'), - install = require('gulp-install'), - requirejs = require('gulp-requirejs'); - -/** -* Gulp Clean -* @async -**/ -gulp.task('clean', (callback) => { - // TODO - callback(); -}); - - -/** -* Gulp Install Dependencies -* @async -* @uses gulp.task.clean -**/ -gulp.task('install', gulpsync.async(['clean'], 'clean'), (callback) => { - // TODO - callback(); -}); - -/** -* Gulp Compile -* @async -* @uses gulp.task.install -**/ -gulp.task('compile', gulpsync.async(['install'], 'install'), (callback) => { - // TODO - callback(); -}); - -/** -* Gulp Build -* @async -* @uses gulp.task.compile -**/ -gulp.task('build', gulpsync.async(['compile'], 'compile'), (callback) => { - // TODO - callback(); -}); - -/** -* Gulp Default -* @async -* @uses gulp.task.build -**/ -gulp.task('default', gulpsync.async(['build'], 'build')); 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 index f59826f..4fad3f3 100644 --- a/src/docs/package.json +++ b/src/docs/package.json @@ -4,8 +4,8 @@ "description": "SquareBox Documentation", "private": "true", "scripts": { - "compile": "gulp", - "build": "npm run compile && jekyll build", + "compile": "r_js -o build.config.js", + "build": "jekyll build && npm run compile", "serve": "npm run build && jekyll serve" }, "repository": { @@ -29,29 +29,7 @@ "babel-preset-es2015": "6.22.0", "babel-preset-react": "6.23.0", "babel-preset-stage-2": "6.22.0", - "fs-extra": "^2.0.0", - "gulp": "3.9.1", - "gulp-babel": "6.1.2", - "gulp-babel-external-helpers": "2.0.2", - "gulp-install": "0.6.0", - "gulp-less": "3.3.0", - "gulp-requirejs": "1.0.0-rc1", - "gulp-sync": "0.1.4" - }, - "dependencies": { - "bootstrap": "3.3.7", - "font-awesome": "4.7.0", - "immutable": "3.8.1", - "jquery": "3.1.1", - "lodash": "4.17.4", - "react": "15.4.2", - "react-dom": "15.4.2", - "react-redux": "5.0.3", - "redux": "3.6.0", - "redux-logger": "2.8.1", - "redux-saga": "0.14.3", - "require-css": "0.1.10", - "requirejs": "2.3.3", - "requirejs-text": "2.0.15" + "bower": "1.8.0", + "glob": "7.1.1" } }