Tag: gruntjs

咕噜不返回任何东西

我以前用我以前的电脑(已经死了)的地面,现在我尝试在我的新电脑上使用它。 问题是我使用它时没有得到任何回应。 更具体的说,我已经去了Gruntfile抵制的文件夹,我运行grunt watch命令,但是我没有得到Grunt任何回应 我的命令行如下所示: merianos@merianos-pc:~/Documents/repositories/project/wp-content/themes/cours-de-musique/bower_components/bootstrap$ grunt watch merianos@merianos-pc:~/Documents/repositories/project/wp-content/themes/cours-de-musique/bower_components/bootstrap$ 另外,我试过npm list –depth=0 | grep grunt-contrib-compass命令 npm list –depth=0 | grep grunt-contrib-compass ,我得到了以下结果: npm ERR! max depth reached: btoa@1.1.2, required by bootstrap@3.3.1 npm ERR! max depth reached: grunt@0.4.5, required by bootstrap@3.3.1 npm ERR! max depth reached: glob@4.0.6, required by bootstrap@3.3.1 npm ERR! max depth reached: grunt-autoprefixer@1.0.1, […]

如何在grunt中分析“<%= =>”?

告诉它包含文件时,很多grunt插件允许这个语法: ['<%= src_dir %>/common/**/*.js', '<%= src_dir %>/app/**/*.js'] 要么 ['<%= test_files.js %>'] 有什么办法,我可以调用一些库,将parsing这些给我一个实际的输出数组? 或者这是直接build立在咕噜声? 我不知道什么条件谷歌甚至使这个显示。 谢谢

“npm安装”触发咕噜任务?

安装本地软件包的一部分npm install触发一个咕task任务吗? 我的Web API是自动生成文档的工具,可以直接从Web服务获取文档站点。 目前,需要一个单独的步骤来执行grunt任务。 我认为这可能会简化部署在npm install过程中包含此步骤。 如果这可以简单地完成,但你认为我不应该,请让我知道为什么。 更新 事实上,一个npm postinstall是要走的路。 也如上所述,似乎与新版本的咕噜,咕噜cli是必需的。 我安装了grunt-cli作为dev依赖项,然后将下面的代码添加到我的package.json中: "scripts": { "postinstall": "./node_modules/.bin/grunt apidoc" }

使用SSI或grunt将所有的shtml文件编译成一个html文件

我正在尝试为现有项目build立一个现场风格指南。 作为这个的一部分,我想包括我在一个文件夹中的所有shtml小部件到一个单一的html文件。 我正在寻找的解决schemetypes将遵循这种行为: search小部件文件夹中的所有文件 编译所有的文件到一个单一的HTML页面 使用文件的名称作为每个包含的小部件上方的标题 该项目通过一个快速服务器同时运行grunt和SSI,所以我猜想有几个选项。 我发现这个软件包中包含了很多咕噜咕噜声,但是其中的大部分都超出了我的知识水平,所以我没有得到任何工作。 这是我到目前为止我的咕噜文件的代码: includes: { files: { src: ['widgets/.shtml'], // Source files dest: 'kitchen-sink', // Destination directory flatten: true, cwd: '.', options: { silent: true, banner: '<!– I am a banner <% includes.files.dest %> –>' } } } 我可以看到这可能与一个单一的命名文件,但循环通过一个文件夹似乎是一个更难的任务。 任何可能的解决scheme的build议,很高兴受到欢迎。

我无法部署我的platypi演示程序

我一直在按照https://platypi.io/docs/getting-started关于如何开始使用platypi的说明。 一切都很顺利,直到我试图创build部署包( https://platypi.io/docs/getting-started/1251/Deploy-to-a-Device )。 当我运行节点命令“grunt build-cordova”时,出现以下错误:“错误:无法运行”ant -version“…”。 所以我尝试input命令“npm install node-ant”来安装ant。 但是,当我这样做,我得到一个错误,说我需要安装Visual Studio 2010构build工具。 我不想安装VS 2010来安装ant,因为我已经安装了VS 2013和2015。 我的问题是:如何在不安装VS 2010的情况下使用grunt命令“grunt build-cordova”来工作? 谢谢。

在Sails.js中使用load-grunt-config

上下文 我已经写了一些咕噜的任务,我想用一个我在Sails.js中编写的新项目来使用它们。 使用Sails.js,你可以添加一个JS文件到/tasks/register文件夹来增加额外的grunt任务。 在我们添加文件之前,让我们来讨论一下这个问题。 问题 帆不会抬起。 debugging器显示: debug: ——————————————————– error: ** Grunt :: An error occurred. ** error: ———————————————————————— ERROR >> Unable to process task. Warning: Required config property "clean.dev" missing. 有问题的问题显然是咕噜,所以然后我尝试grunt build (自动运行与sails lift ): Running "clean:dev" (clean) task Verifying property clean.dev exists in config…ERROR >> Unable to process task. Warning: Required config property […]

咕噜服务的问题

我有项目,但我不能运行他。 我使用WebStorm IDE,进入grunt服务器后,发现下面的错误: grunt serve Loading "connect.js" tasks…ERROR >> SyntaxError: C:\Users\TT\Documents\ES\frontend\node_modules\grunt-contrib-connect\node_modules\connect\node_modules\type-is\node_modules\mime-types\node_modules\mime-db\db.json: Unexpect ed end of input Loading "cssmin.js" tasks…ERROR >> Error: Cannot find module './source-map/source-map-generator' Loading "jshint.js" tasks…ERROR >> Error: Cannot find module 'jshint/src/cli' Loading "uglify.js" tasks…ERROR >> Error: Cannot find module 'pako/lib/zlib/messages' Loading "cdnify.js" tasks…ERROR >> SyntaxError: C:\Users\TT\Documents\ES\frontend\node_modules\grunt-google-cdn\node_modules\google-cdn\node_modules\cdnjs-cdn-data\external\cdnjs.json: Unexpected end of input Loading "inline_angular_templates.js" […]

使用Grunt手表和SASS错误

我正在尝试在Windows上使用SASS,但是每次出现错误 Waiting… OK >> File "scss\main.scss" changed. Running "sass:dist" (sass) task Error: Error generating source map: couldn't determine public URL for the source stylesheet. No filename is available so there's nothing for the source map to link to. on line of standard input Use –trace for backtrace. Warning: Error: Error generating source map: couldn't determine […]

Grunt grunt-contrib-cssmin运行无止境不会结合文件

我有一个与grunt-contrib-cssmin奇怪的问题。 它永远不会停止或给出错误。 我在用 C:\ projects \ doeclf> grunt –version && node –version && npm –version grunt-cli v0.1.13 grunt v0.4.5 v0.12.4 2.10.1 我的grunt.js已经在其中 cssmin: { target: { files: [{ expand: true, cwd: 'css/', src: ['index.css', '!*.min.css'], dest: 'css/', ext: '.min.css' }] } } 我的项目结构如下 | | grunt.js | | __css | | __index.css 当我运行我的咕噜任务,这是它抛出,它永远不会结束。 从我的咕噜cssmin –verbose的输出是 […]

Grunt任务无限期运行

我已经安装了咕噜声,并尝试grunt-react和grunt-contrib-imagemin任务。 我已经安装了下面的Gruntfile.js 。 module.exports = function(grunt) { grunt.initConfig ({ imagemin: { dynamic: { files: [{ expand: true, cwd: 'public', src: ['development/images/*.{png,jpg,gif}'], dest: 'images' }], options: { cache: false } } }, react: { single_file_output: { files: { 'bundle.jsx': 'login.jsx' } } } }); grunt.loadNpmTasks('grunt-contrib-imagemin'); grunt.loadNpmTasks('grunt-react'); grunt.registerTask('imagemin', ['imagemin']); grunt.registerTask('react', ['react']); }; 从命令行,我开始任务作为grunt react或grunt imagemin 。 在通过一个–verbose […]