Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/ratchet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2015-02-09 06:43:37 +0300
committerXhmikosR <xhmikosr@gmail.com>2015-02-09 06:43:37 +0300
commitc24c4cc50dd107a2f813aea6642b615ebf26b27a (patch)
tree06fb8c4d4502fa2656136ac68d246e538bd01ebf
parent12b869e68e46f13efaf6ddabf331f7f49a1f2c15 (diff)
parentf7e432e4b5191415aafd07f02fcd584e8e21407d (diff)
Merge pull request #618 from watilde/integrate-grunt-task
Integrate `grunt-contrib-connect` for easier local development
-rw-r--r--Gruntfile.js42
-rw-r--r--package.json1
2 files changed, 35 insertions, 8 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index f81799a..61251b8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -26,7 +26,9 @@ module.exports = function (grunt) {
meta: {
distPath: 'dist/',
docsAssetsPath: 'docs/assets/',
- docsPath: 'docs/dist/',
+ docsDistPath: 'docs/dist/',
+ docsPath: 'docs/',
+ jsPath: 'js/',
srcPath: 'sass/'
},
@@ -41,7 +43,7 @@ module.exports = function (grunt) {
' */\n',
clean: {
- dist: ['<%= meta.distPath %>', '<%= meta.docsPath %>']
+ dist: ['<%= meta.distPath %>', '<%= meta.docsDistPath %>']
},
concat: {
@@ -139,7 +141,7 @@ module.exports = function (grunt) {
src: [
'**/*'
],
- dest: '<%= meta.docsPath %>'
+ dest: '<%= meta.docsDistPath %>'
}
},
@@ -226,11 +228,22 @@ module.exports = function (grunt) {
},
watch: {
- scripts: {
- files: [
- '<%= meta.srcPath %>**/*.scss'
- ],
- tasks: ['sass']
+ options: {
+ hostname: 'localhost',
+ livereload: true,
+ port: 8000
+ },
+ js: {
+ files: '<%= meta.jsPath %>**/*.js',
+ tasks: ['dist-js', 'copy']
+ },
+ css: {
+ files: '<%= meta.srcPath %>**/*.scss',
+ tasks: ['dist-css', 'copy']
+ },
+ html: {
+ files: '<%= meta.docsPath %>**',
+ tasks: ['jekyll']
}
},
@@ -310,6 +323,18 @@ module.exports = function (grunt) {
replacement: grunt.option('newver'),
recursive: true
}
+ },
+
+ connect: {
+ site: {
+ options: {
+ base: '_site/',
+ hostname: 'localhost',
+ livereload: true,
+ open: true,
+ port: 8000
+ }
+ }
}
});
@@ -325,6 +350,7 @@ module.exports = function (grunt) {
grunt.registerTask('build', ['dist']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('test', ['dist', 'csslint', 'jshint', 'jscs', 'validate-html']);
+ grunt.registerTask('server', ['dist', 'jekyll', 'connect', 'watch']);
grunt.registerTask('build-ratchicons-data', generateRatchiconsData);
diff --git a/package.json b/package.json
index 4822eb5..4d5fe3e 100644
--- a/package.json
+++ b/package.json
@@ -31,6 +31,7 @@
"grunt-banner": "~0.3.1",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-concat": "~0.5.0",
+ "grunt-contrib-connect": "~0.9.0",
"grunt-contrib-copy": "~0.7.0",
"grunt-contrib-csslint": "~0.4.0",
"grunt-contrib-cssmin": "~0.11.0",