gruntjs

how to compile multiple scss files into multiple css files with grunt-sass?

我只是一个虾纸丫 提交于 2021-02-08 10:40:23
问题 i would like to compile all SCSS files that are inside scss folder and are not imported ( file names do not start with _ ) each into separate CSS files( that has the same name as SCSS file ). that kind of functionality that can be found in Prepros. is it possible to do it with grunt-sass? i tried this but it doesn't work: sass: { dist: { files { 'css/*.css': 'scss/*.scss', } } } 回答1: You can try: sass: { dist: { files: [{ expand: true, cwd: 'styles', src: ['*.scss'], dest: '../public', ext: '

how to compile multiple scss files into multiple css files with grunt-sass?

纵饮孤独 提交于 2021-02-08 10:37:20
问题 i would like to compile all SCSS files that are inside scss folder and are not imported ( file names do not start with _ ) each into separate CSS files( that has the same name as SCSS file ). that kind of functionality that can be found in Prepros. is it possible to do it with grunt-sass? i tried this but it doesn't work: sass: { dist: { files { 'css/*.css': 'scss/*.scss', } } } 回答1: You can try: sass: { dist: { files: [{ expand: true, cwd: 'styles', src: ['*.scss'], dest: '../public', ext: '

Grunt sass don't have ruby and sass installed?

风流意气都作罢 提交于 2021-02-05 07:35:24
问题 When I want to use my sass task with grunt I immediately get this error: Warning: You need to have Ruby and Sass installed and in your PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-sass Use --force to continue. When I use my project on my Macbook I have no problems but when I use it on my iMac I get this message. I tried reinstalling sass several times by using several methods but none of them seem to work. Anyone has an idea? My iMac is pretty new so I might

Is there an offline installer for gruntjs?

会有一股神秘感。 提交于 2021-02-05 06:00:27
问题 I am trying to find a way to intall gruntjs without internet access. Is there a way to download an installer? Stack overflow is giving me a hard time about the format of this question and I"m not sure what else to write. It's a pretty straightforward request. 回答1: Sort of. You'll need internet access at some point to acquire the Grunt source from Github. Grunt is a node module, and therefore needs to installed to the node_modules folder in your project. You can do this via npm , but you can

grunt build removes d3.js and google fonts from application

家住魔仙堡 提交于 2021-01-29 07:47:02
问题 I've configured my Angular app with Yeoman, and have included many JS libraries like d3. The application works fine when I use grunt serve to see the app. But when I try to build it using grunt build , and open the generated index.html, the app breaks because it cannot find D3. If I manually include the script tag for loading D3 in final index.html, then it starts working, but that's not how it's supposed to work, right? The grunt build also removes google Fonts which I've included in my app:

grunt-contrib-uglify v5.0.0 still unable to support ES6 Template Literals?

心不动则不痛 提交于 2021-01-29 06:07:05
问题 UPDATE, Jan 09, 2012: At first, I thought it was due to the single quotes within the template literal: replyTo: `'MTN Support' <${functions.config().supportgmail.email}>` But now, it's confirmed that even a normal template literal is not supported by grunt-contrib-uglify : throw new Error(`Unknown sender email address: ${mailOptions.from.address}.`); Same Error: Warning: Uglification failed. Unexpected token: name «sender», expected: punc «,». Line 90 in functions/app-functions.js,functions

Grunt refuses to create a custom.min.css file

北城以北 提交于 2021-01-28 08:00:06
问题 I'm currently learning how to use PostCSS with Grunt in one of my classes. Asked my professor if they could help me, they said the Gruntfile.js looked fine, but maybe the issue was my file name being lowercase. I changed it to Gruntfile.js and am receiving the same error. It is automatically supposed to create the custom.min.css, but due to the error (located below), it does not. I contacted my professor, but it seems that we've hit a dead-end. Every time I create the JS file for Grunt, save

grunt-terser Giving SyntaxError: “VARIABLE_NAME” is redeclared

99封情书 提交于 2021-01-28 05:44:31
问题 I'm using grunt-terser to minify my es6 files. I have two files. file-1.js file-2.js In both files I have required a module with same variable name like this: const VARIABLE_NAME = require('MODULE_NAME'); Here is my grunt-terser task: terser: { main: { options: { compress: true, toplevel: true }, files: { './dist/app.js': ['file-1.js', 'file-2.js'] } } } When I run npx grunt terser I get the following error: Running "terser:main" (terser) task >> SyntaxError: "VARIABLE_NAME" is redeclared 来源:

less.modifyVars not updating LESS variable

◇◆丶佛笑我妖孽 提交于 2021-01-27 07:50:40
问题 My project has a requirement to have a user-editable theme. Meaning the users should have the ability to change the different colors used in the application. I've imported less.js (version 1.7.0) into my project and I've successfully called the less.modifyVars() function from my javascript but for some reason my less file isn't getting updated. My stylesheet is dynamically compiled by grunt. This is the code in head of the HTML: <link rel="stylesheet/less" type="text/css" href="/static/<%=

less.modifyVars not updating LESS variable

吃可爱长大的小学妹 提交于 2021-01-27 07:46:27
问题 My project has a requirement to have a user-editable theme. Meaning the users should have the ability to change the different colors used in the application. I've imported less.js (version 1.7.0) into my project and I've successfully called the less.modifyVars() function from my javascript but for some reason my less file isn't getting updated. My stylesheet is dynamically compiled by grunt. This is the code in head of the HTML: <link rel="stylesheet/less" type="text/css" href="/static/<%=