I'm trying to setup a file watcher in PyCharm for my SASS files. I've followed the official guide and it worked jsut fine (https://www.jetbrains.com/help/pycharm/transpiling-sass-less-and-scss-to-css.html#)
Now I'd like to change the destination of the compiled CSS files to a specific folder, relative to the SASS file. Basically, the output directory should be ../css/ when starting from the SASS file, because my structure looks like this:
app1/
static/
css/
myfile.css
sass/
myfile.sass
app2/
static/
css/
myfile2.css
sass/
myfile2.sass
I'm not sure I understand what values I should put in arguments and output paths to refresh. I'm currently using the default settings (https://imgur.com/a/rrIJHeR)
I solved it. For anyone struggling with the same issue, here's how I fixed it:
Arguments = sass\$FileName$:css\$FileNameWithoutExtension$.css
Output = css\$FileNameWithoutExtension$.css
Working Directory = $FileParentDir$
Here's an image of the setup :
Related
I'm working on a portfolio in Vue.js. I added a button that allows the user to download a copy of my resume (a PDF file). The button works great in development. The file is in my public folder, which is supposed to be the static directory where all files are copied to the dist folder from. When I run the command vue build, the only thing copied from that folder is the index.html page. I have tried adding images to that folder and they are also not being copied over. My vue.config.js file looks like this:
module.exports = {
publicPath: '.'
};
So the relative paths are correct for the deployed files.
I have a similar setup working perfectly fine at my job, with the same version of Vue and vue-cli-service (both 6.14.11). I'm relatively new to Vue so any help would be greatly appreciated.
Edit: I've also noticed that even though I changed the <title> tag in public/index.html to "James Bell's Portfolio", the title in the production code is "Vue CLI App".
Here's the github repo: https://github.com/jamesthedev/portfolio
I figured it out! I was running vue build from the src folder. I needed to run vue-cli-service build from the root directory. Once I did that, all my static assets were copied to dist.
enter image description here
When I click Disable(Workspace) the error is:
Cannot disable extension 'ESLint'. Extension 'Node.js Extension Pack' depends on this.
In what other way can react-native errors be eliminated???
You need to define .eslintignore file in your root directory and add the path of the folder you wish to ignore from linting.
Reference: https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories
The suggested way to solve the issue is to resolve all the linter issues as they can help you to overcome some scaling issues and make your code consistent.
Workaround for the problem is you can create a file .eslintignore in the root directory of your project and add the file path for which you want to disable the linter.
To disable the Eslint. You can follow the steps.
Navigate to the folder where you defined package.json (Project root directory).
Create a new file with the name .eslintignore
Edit the .eslintignore to add the files where you do not want the linter. Example, you have an src directory where all the react code is present, you want to diable linters for whole src directory. Add the following line in .eslintignore.
src/*
Don't know if you can disable it all but this worked for me for the time being add this // eslint-disable-next-line before the line it warned about
I use lessc 2.7.3. I generate css files via a makefile and use following paths
the makefile is in themes/bodensee
the css is generated in themes/bodensee/css
the less files are in themes/bodensee/less
the maps are in the same folder as the css files.
My problem is that css files misses the themes/bodensee path, so it raises a file not found on css.map files.
lessc -s less/wlb.less --clean-css="--s0 --advanced" --source-map-rootpath=themes/bodensee/ --source-map="css/wlb.css.map" css/wlb.css
The CSS file now contains `sourceMappingURL=css/wlb.css.map``The rootpath does not have any effect.
I also tried a fantasy rootpath and searched for it in the file - it does not appear anywhere. But the option is correct. When I try to missspell the option, LESS drops an error.
What am I missing?
Description of the --source-map-rootpath option from here
Specifies a rootpath that should be prepended to each of the less file paths inside the sourcemap and also to the path to the map file specified in your output css.
Because the basepath defaults to the directory of the input less file, the rootpath defaults to the path from the sourcemap output file to the base directory of the input less file.
Use this option if for instance you have a css file generated in the root on your web server but have your source less/css/map files in a different folder. So for the option above you might have
The problem was indeed related to the Clean-CSS plugin.
I now call
lessc --source-map --clean-css="--s0 --advanced" -s less/wlb.less css/wlb.css which is working.
There is a standalone clean-css program, but that does not generate sources for the Less files. It's not clear if the lessc plugin and the standalone tool are the same or different implementations but both use node.
The standalone cleancss tool removes the source map URL generated by lessc be default (did not play around with the dozens of options).
These Node tools develop very fast and manual/tutorials often are outdated. That's why my make file stopped working. Developers of that tools should really consider not to touch working parameters or features and to keep their code compatible.
I'm am trying to understand the directives that produce the output /dist/vue[.min].js file(s). While looking in node_modules folder, I see /dist and /src folders. The /src folder contains index.js. If I were to follow the dependency tree all the way through, would that result in the dist file? If the compiler is present, or the rules, in the vue package. I would appreciate if someone could point this out (and also verify/debunk my understanding of how the output file is produced).
Your build tool is actually responsible for creating the vue.min.js file. In case if you are not using any build tool then you need to use the minified version of vue.js file from the Vuejs site.
Also the vue.js gets created using the mode value of process.env.NODE_ENV variable.
You can have more details of this from the Production Deployment docs from the Vuejs site.
The rest of the details regarding the dir structure given in the vue.config.js config file.
stackoverflowI am trying to create a source map with lessc so I am able to debug css in chrome.
I am using the terminal.
Unfortunately does the generated file contain wrong file paths. It seems it does mix up relative paths with absolute paths.
My command:
lessc --source-map=sites/all/themes/bootstrap_base/css/index.css.map
--source-map-basepath=sites/all/themes/bootstrap_base/css
sites/all/themes/bootstrap_base/less/style.less
sites/all/themes/bootstrap_base/css/style.css
As a result my paths look like this:
../less//Volumes/DATA/WORK/RESOURCES/WORKSPACE/MAMP_HTDOCS/BASE.drupal/sites/all/themes/bootstrap_base/bootstrap/less/normalize.less
What I am doing wrong?
Thanks