mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Merge pull request #126 from juliandescottes/add-grunt-task-webserver
Add grunt task webserver
This commit is contained in:
commit
d909cec19d
35
Gruntfile.js
35
Gruntfile.js
@ -18,7 +18,7 @@ module.exports = function(grunt) {
|
|||||||
filesSrc : ['tests/integration/casperjs/*_test.js'],
|
filesSrc : ['tests/integration/casperjs/*_test.js'],
|
||||||
options : {
|
options : {
|
||||||
args : {
|
args : {
|
||||||
baseUrl : 'http://localhost:' + '<%= connect.www.options.port %>/',
|
baseUrl : 'http://localhost:' + '<%= connect.test.options.port %>/',
|
||||||
mode : '?debug',
|
mode : '?debug',
|
||||||
delay : delay
|
delay : delay
|
||||||
},
|
},
|
||||||
@ -32,12 +32,6 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
jshint: {
|
jshint: {
|
||||||
/*options: {
|
|
||||||
"evil": true,
|
|
||||||
"asi": true,
|
|
||||||
"smarttabs": true,
|
|
||||||
"eqnull": true
|
|
||||||
},*/
|
|
||||||
options: {
|
options: {
|
||||||
indent:2,
|
indent:2,
|
||||||
undef : true,
|
undef : true,
|
||||||
@ -54,10 +48,17 @@ module.exports = function(grunt) {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
connect : {
|
connect : {
|
||||||
www : {
|
test : {
|
||||||
options : {
|
options : {
|
||||||
base : '.',
|
base : '.',
|
||||||
port : 7357
|
port : 4321
|
||||||
|
}
|
||||||
|
},
|
||||||
|
serve : {
|
||||||
|
options : {
|
||||||
|
base : '.',
|
||||||
|
port : 1234,
|
||||||
|
keepalive : true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -101,9 +102,19 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-ghost');
|
grunt.loadNpmTasks('grunt-ghost');
|
||||||
grunt.loadNpmTasks('grunt-leading-indent');
|
grunt.loadNpmTasks('grunt-leading-indent');
|
||||||
|
|
||||||
|
// Validate
|
||||||
grunt.registerTask('lint', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint']);
|
grunt.registerTask('lint', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint']);
|
||||||
grunt.registerTask('test', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint', 'connect', 'ghost:default']);
|
|
||||||
grunt.registerTask('precommit', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint', 'connect', 'ghost:local']);
|
|
||||||
|
|
||||||
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
|
// Validate & Test
|
||||||
|
grunt.registerTask('test', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint', 'connect:test', 'ghost:default']);
|
||||||
|
|
||||||
|
// Validate & Test (faster version) will NOT work on travis !!
|
||||||
|
grunt.registerTask('precommit', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint', 'connect:test', 'ghost:local']);
|
||||||
|
|
||||||
|
// Validate & Build
|
||||||
|
grunt.registerTask('default', ['leadingIndent:jsFiles', 'leadingIndent:cssFiles', 'jshint', 'concat', 'uglify']);
|
||||||
|
|
||||||
|
// Start webserver
|
||||||
|
grunt.registerTask('serve', ['connect:serve']);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
BIN
mongoose-3.7.exe
BIN
mongoose-3.7.exe
Binary file not shown.
@ -14,9 +14,9 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "~0.4.1",
|
"grunt": "~0.4.1",
|
||||||
"grunt-contrib-connect": "0.3.0",
|
"grunt-contrib-connect": "0.3.0",
|
||||||
|
"grunt-contrib-concat": "0.1.2",
|
||||||
"grunt-contrib-jshint": "0.5.4",
|
"grunt-contrib-jshint": "0.5.4",
|
||||||
"grunt-contrib-uglify": "0.2.2",
|
"grunt-contrib-uglify": "0.2.2",
|
||||||
"grunt-contrib-concat": "0.1.2",
|
|
||||||
"grunt-ghost": "1.0.12",
|
"grunt-ghost": "1.0.12",
|
||||||
"grunt-leading-indent" : "0.1.0"
|
"grunt-leading-indent" : "0.1.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user