grunt compass generates file not accessible - grunt-contrib-compass

I have a grunt task to generate .css files from .sass
compass: {
dist: {
options: {
sassDir: 'app/styles',
cssDir: 'app/styles',
environment: 'development' // production for prod env
}
}
}
The css files generated are "rw-------". How should I config the task to set file permissions to what I want?

The generated files inherit the permissions of the user who generates them you might be running it as the wrong user. That may be highly unlikely but check it . If you on Linux use sudo or su. If doesn't work i'm out of ideas as I stopped working with development in Linux as the xampp bugs me a lot. :)

Related

PhpStorm file watcher "Error: Cannot find module" with babel plugins in a rollupjs script (no executable available), plugins globally installed

I can't seem to be able to resolve this, hoping someone might be able to help.
I have configured a file watcher to check for changes in a source directory. When a change is found, it runs the following tool: -
Program: C:\xampp\htdocs\currentproject\packages\node_modules\.bin\rollup
Arguments: -c C:\xampp\htdocs\currentproject\packages\source_directory\rollup.config.js
It is finding the rollup script OK but then I run into an issue as the rollup.config.js file calls babel as a plugin: -
import babel from "rollup-plugin-babel"
plugins: [
babel({})
],
babel.config.js: -
module.exports = {
presets: [
'#babel/preset-env',
'#babel/preset-react',
],
plugins: [
"#babel/plugin-proposal-class-properties",
"babel-plugin-styled-components"
],
}
It finds this config file OK but then I get the following error: -
(plugin babel) Error: Cannot find module '#babel/plugin-proposal-class-properties' from 'C:\xampp\htdocs\currentproject'
Now I understand how to configure external tools in PhpStorm but #babel/plugin-proposal-class-properties does not have a .bin/executable, only a .js file. I have also tried installing it globally via yarn and created a Windows environment variable to point to the global yarn directory but to no avail - I still get the same error.
Can anyone help me with this?

No valid bower.json was found in any branch or tag of https://github.com/yiisoft/jquery-pjax.git

Hello I have some issue with composer installation after installing your package in composer globally. See the error below
[Composer\Repository\InvalidRepositoryException]
No valid bower.json was found in any branch or tag of https://github.com/yiisoft/jquery-pjax.git, could not load a package from it
You need to try these solution and usually its will be fixed:
1) if you have antivirus turn it off since its maybe block some of needed port.
2) run this command composer clear-cache in your project.
3) if first and second solution not work, then go to /root/.composer directory, and create file config.json and put these command inside it.
{
"config": {
"preferred-install": "dist",
"github-protocols": ["https","http"],
"github-oauth": {
"github.com": "YourGithubOauth"
}
}
}
then clear cache again. and I wish its work.
Good luck.

Missing fonts folder on jekyll deploying to netlify

When deploying jekyll project to netlify I am missing my fonts folder.
It works perfectly find when in development mode but when I tell it to run in production it seems to skip over adding my fonts folder to the _site/assets directory.
I believe it has to be something in the config but I am fairly new to jekyll and YAML. And in the code its seems to be saying to add all the assets underneath it to the build process.
Below is my _config.yml file.
copy:
# Paths to static assets that aren't (S)CSS or JavaScript
# because these are completely handled by the sass and javascript tasks
assets:
# all files below the assets dir
- "assets/**/*"
# exclusions:
- "!assets/{js,scss,css}/**/*" # js, scss and css files
- "!assets/css{,/**}" # css dir
- "!assets/js{,/**}" # js dir
- "!assets/scss{,/**}" # scss dir
- "!assets/vendor{,/**}" # vendor di
dist: "_site/assets/"
notification: "Running Copy"
Note: I work for Netlify
While I'm not sure of the fail mode here, I can tell you a couple things that would help you debug:
the easiest way to debug a build is described in this article: https://www.netlify.com/blog/2016/10/18/how-our-build-bots-build-sites/ . This lets you duplicate our build environment in a way that you can access during/after the build so you can see what is happening or has happened in more depth than our build logs
If you write into support we can set a verbose flag on your builds that does the equivalent of 'set -x' on the building shell script to show you what's being run in production, though filtering this output is quite a task for a human, it may be more useful than nothing!

BrowserSync + Gulp with Vagrant not refreshing

I'm using BrowserSync with Gulp to live reload a site in a local machine when specific kinds of files are changed. I've the following snippet in my gulpfile:
gulp.task('browser-sync', function() {
browsersync.init({
proxy: "mySite:8080",
files: ["./*.html", "dev/*.css"]
});
});
When changing (and saving) any of the above kinds of files, I get an output like this in my terminal:
[BS] Serving files from: ./
[BS] Watching files...
[BS] File changed: index.html
[BS] File changed: dev\styles.css
All the while, the site reloads as expected, but its content does not reflect the changes that were made. I can't figure out what am I doing wrong here. Any hint appreciated!
UPDATE
I forgot to mention that my host machine is running Windows 10 and my guest machine is running Ubuntu 14.04.4 LTS. The VM provider is VirtualBox.
Initially, I was using the default config.vm.synced_folder method. I had this on my vagrantfile:
config.vm.synced_folder "/Path/To/My/Host/Website/Folder/", "/usr/nginx/html/mywebsite/"
I've since tried using NFS, with the following configuration:
config.vm.synced_folder "/Path/To/My/Host/Website/Folder/", "/usr/nginx/html/mywebsite/",
:type => :nfs,
:mount_options => ['nolock,vers=3,udp,noatime,actimeo=1']
Since my host is running Windows, I installed the plugin vagrant-winnfsd, which adds support for NFS. But now vagrant halts when it tries to mount the NFS shared folder.
In addition, since I was getting the following error on vagrant up: GuestAdditions versions on your host (5.0.16) and guest (4.3.36) do not match, I installed the plugin vagrant-vbgues, in order to keep VirtualBox Guest Additions up to date. At no avail either. Vagrant is still freezing when it tries to mount the NFS shared folder.
The title and the tags say you're using Vagrant, even though it's not mentioned in your question.
Make sure your changes are being synced to the VM. Have a look at the vagrant documentation to select the type of synced folders that will work for your situation. Their basic example is as follows:
Vagrant.configure("2") do |config|
# other config here
config.vm.synced_folder "src/", "/srv/website"
end
You can vagrant ssh and check the files manually to make sure they match, and that the synced folders are working as expected.
UPDATE
Based on the new information and comment, I would recommend using rsync as the shared folder method.
config.vm.synced_folder "Host/Path/", "/Guest/Path", type: "rsync",
rsync__exclude: [ '.git', 'logs'],
rsync__args: ["--verbose"],
rsync__chown: false
I have never found a way to make NFS play well (and perform well) if Windows is in the mix.
It so happens that the problem was related with VirtualBox, as explained here. Since I'm running Nginx on a virtual machine in VirtualBox, the solution to my problem was to comment out the sendfile directive in nginx.conf, or simply set it off, like this:
sendfile off;
The same issue is reported here, and here. As well as in the Vagrant docs, which state that "There is a VirtualBox bug related to sendfile which can result in corrupted or non-updating files."

Unpacking tar.gz into root dir with Gradle

My project contains a couple of tar.gz files that I need to extract to the root directory of the project.
I made this as a test:
task untar (type: Copy) {
from tarTree(resources.gzip('model.tar.gz'))
into getProjectDir()
}
When I run it, it's throwing this exception: org.gradle.api.UncheckedIOException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file.
I'm using Gradle 1.1 in Windows 7.
Thanks for the help.
I was able to extract it using this:
task test {
doLast {
copy {
from tarTree(resources.gzip('model.tar.gz'))
into getProjectDir()
}
}
}
My only guess is that either the dir or the tgz file or both are locked during the configuration phase and it's released during the execution phase.
If someone has a solution using the copy task and not the copy method I would appreciate it.