Я хочу написать свой Gruntfile.js
с помощью livescript.
Я сделал Gruntfile.js
и Gruntfile.coffee
, которые работают из коробки
Gruntfile.ls
должно работать ... верно?
Я видел несколько Gruntfile.ls
в сети, или нужно ли их компилировать (кроме версии .coffee)?
Livescript
(Ошибка при вызове $ grunt
)
A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.
Gruntfile.ls
#global module:false
module.exports = (grunt) ->
# Project configuration.
grunt.init-config {}=
meta:
version: \0.0.1
livescript:
src:
files:
"build/js/main.js": "src/scripts/main.ls"
watch:
livescript:
files: <[src/scripts/**/*.ls]>
tasks: <[livescript]>
options: {+livereload}
# load tasks
grunt.loadNpmTasks \grunt-livescript
grunt.loadNpmTasks \grunt-contrib-watch
# register tasks
grunt.registerTask \default, <[livescript]>
составлено:
(работает при звонке $ grunt
)
Gruntfile.js
module.exports = function(grunt){
grunt.initConfig({
meta: {
version: '0.0.1'
},
livescript: {
src: {
files: {
"build/js/main.js": "src/scripts/main.ls"
}
}
},
watch: {
livescript: {
files: ['src/scripts/**/*.ls'],
tasks: ['livescript'],
options: {
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-livescript');
grunt.loadNpmTasks('grunt-contrib-watch');
return grunt.registerTask('default', ['livescript']);
};
Gruntfile.js
, которое компилирует вашGruntfile.ls
, а затем запускает его с теми же аргументами, должно выполнить свою работу. - person jgillich   schedule 04.04.2014Gruntfile.ls
вJavaScript
- person   schedule 04.04.2014.gitignore
указывает, что они на самом деле компилируют его, а не запускают напрямую. - person jgillich   schedule 04.04.2014livescript -c Gruntfile.ls && grunt
... хм ?? это делает меня счастливым? не совсем .. вздох ну по крайней мере работает - person   schedule 04.04.2014.bash_profile
- ›alias gruntls='livescript -c Gruntfile.ls && grunt'
спасибо за помощь - person   schedule 04.04.2014