linter-jshint lint JavaScript inside markdown file in Atom editor - jshint

The package I am using is linter-jshint, even after I add the .jshintignore file both in the project directory and home directory. It still lints the JavaScripe code inside the .md file.
How to make it only lint the file with .js extension.

That is actually a bug in the core language-gfm package. The base linter determines which providers to invoke using the scopes that grammars provide us, the language-gfm grammar provides incorrect scopes which results in linter-jshint being triggered in markdown files, it provides us source.js, instead of source.embedded.js.
You can find more info about this bug in atom/language-gfm#121.
As a workaround you can disable language-gfm package and install the language-markdown package.

Related

Client-side changes don't apply after deployment the AMP

I made changes to the people-finder.js script to change the sort order, and locally everything works well. To override the functionality, I used the following directory structure and Maven-based SDK to generate AMP file:
As I expected, locally everything works fine and I can see my changes:
Next, I deploy the AMP file on the remote server, as described here: Install the AMP file
And here I do not see my changes:
Directory /opt/alfresco-community/tomcat/webapps/share/components/people-finder also contains the scripts without changes.
And thus, sorting does not work as I need.
Additional information: I unpacked the AMP file and not found there branch /web/components/... Of course, people-finder.js and people-finder-min.js is not present there also.
What could be the reason?
All that was required is to add a parameter -force:
sudo java -jar bin/alfresco-mmt.jar install amps/some-customization-share-1.0-SNAPSHOT.amp tomcat/webapps/share.war -force
Thank you very much Sanjay Patel for your assistance!
These discussions can also be useful:
Client-side changes don't apply after deployment the AMP
Files inside src/main/amp/web folder aren't packaged inside the resulting amp file
Modifications of original client-side files are not picked up

R package development, Possible to create submaps within \R directory?

I'm trying to create a R package. Now I've used roxygen and devtools to help create all necessary files and it's working.
Among others I have the maps /man , /R, /tests. Now I would like to create some subfolders in /R directory, but once I do this and move any scripts inside I get an Error in namespaceExport(ns, exports) when trying to rebuild the package.
Can I only have script files directly within /R subdirectory, and is there any solution to this other than putting the script files in other maps one level up? (such as old scripts that one may use in the future)
Thanks

how to wrap a library without build files in meteor package

I try to wrap a javascript library with a meteor package.
When i fork the library it has no built javascript file inside the repository. Normally someone would run grunt dist to build the dist/library.js file.
Meteor Package description:
Package.onUse(function(api) {
api.addFiles([
'dist/library.js',
])
})M
this can't work because the file does not exist yet.
How can i create a package from that library? is coping the library.js file the only way?
If you want to do this, you're going to have to require Grunt, run Grunt through the JavaScript API (not the CLI) to compile dist/library.js, and then require it.
It would be much easier to just compile it outside of Meteor and place it in the folder, but if you want to do things The Right Way™ that's how you'd do it. Let me know if you have any implementation-specific questions!

Meteor package naming error

I've been working on a Meteor package for some time now and I have been been using a Meteor SCSS build package to compile my sass. Now for reasons like autoprefixer and such, I need to compile the SCSS outside of Meteor. My plan was to use Codekit but when I try to build the SCSS I get an error with no message at all. When I use the Sublime Text 2 SCSS build package I get an error as well. I have come to the conclusion that this is because of my Meteor package name. I have named it:
myusername:packagename
and as a folder that translates to
myusername/packagename
It replaces : with / and because of that, Codekit thinks the folder named myusername/packagename is two folders myusername -> packagename. That messes up the folder tree when Codekit tries to compile it.
Is there a good way to handle this?
To solve this problem, you can rename the directory of the package and then add an entry inside the Package.describe call in package.js:
Package.describe({
summary: "My package",
version: "0.0.1",
name: "myusername:packagename"
});
Now, the name of the package will be read from package.js and the directory can be called whatever you want.

Frustration using rJava to call a third party Java jar

I'm trying to use R to hook the Java code from the GSRad project. The GSRad Java code is available online and comes as a One-Jar project jar (I was not familiar with One-Jar until today). I can run the One-Jar file just dandy using the following command (after unzipping the file from the above link):
java -jar gsrad_sample.jar
When I pop open the gsrad_sample.jar file I see a jar titled clima_GSRAD-1.0.0.jar in the /lib/ directory which contains the class files I want to hook with R. I've pulled out the jar of my affection and tried the following, to no avail:
library(rJava)
.jinit()
.jaddClassPath( "/home/jal/Documents/DSSAT/gsrad/clima_GSRAD-1.0.0.jar" )
.jnew( "cra/clima/gsrad/GSRBristowCampbellStrategy" )
Any tips on how I might hook the classes inside the clima_GSRAD-1.0.0.jar? I'm flummoxed.
EDIT
The GSRad site requires registration which is annoying. The full zip file which contains the Doxygen documentation for the Java package as well as the One-Jar jar file is available here and if you pop that open the jar that has the classes I want to hook is this one.
Let me preface my answer by saying that I'm no expert in Java / rJava, so apologies if this isn't 100% correct. I hope it's a step in the right direction though.
Start by unzipping gsrad_sample.jar to C:/gsrad (or adjust your paths based on where you unzip it). Then add all the contents of C:/gsrad/lib to your class path:
library(rJava)
.jinit()
.jaddClassPath(dir( "C:/gsrad/lib", full.names=TRUE ))
.jclassPath()
.jnew( "cra/clima/gsrad/GSRBristowCampbellStrategy" )

Resources