You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is only a problem if you want it to be. Instead of --use_strict, I put "use strict"; in my jakefiles.
I explain what I'm doing, so you know some of what people are doing with Jake.
I'm using flow check to check my typing in Jakefiles, so that's how this comes about. Instead of running jakefiles with your .bin/jake.cmd, I use a command like this:
flow-node "<path to jake>/jake/bin/cli.js" -f foo_jakefile.js
Since I'm running things direct, I go ahead and try:
flow-node --use_strict <path to jake>/jake/bin/cli.js -f foo_jakefile.js
Errors start to crop up do to the utilities package. I started to hunt them down and make changes, but one problem is that there's more than one node_modules/utilities folder. So, I quit trying to fix things that way.
With flow check, it wants to resolve the use of functions desc and task in a Jakefile, so I import, like const jake = require("jake"), and then use jake.desc and jake.task.
That makes flow happy, but I still end up having to make exceptions for Jake, rather than run it like a normal Node module.
For example, I have a simple JS file that imports 20 or so modules, to test that they're in the right path. In that file, I can't do a const jake = require("jake") because my general node command is node --use_strict.
There's not a problem. But I have big plans for Jake, to do a lot of JavaScript in a Jake file, thus the reason for using Flow with Jake.
Thanks.
The text was updated successfully, but these errors were encountered:
I suppose utilities is one of the culprits that prevents the use of --use_strict, but I don't do global installs of modules, or tweak the default downloads of dependencies. I let different packages download whatever packages they specify.
My general mode of operation is to figure out how to use a package as is without doing any mods, such as fixing dependencies. There could be other packages that also don't work with --use_strict.
This is only a problem if you want it to be. Instead of
--use_strict
, I put"use strict";
in my jakefiles.I explain what I'm doing, so you know some of what people are doing with Jake.
I'm using
flow check
to check my typing in Jakefiles, so that's how this comes about. Instead of running jakefiles with your.bin/jake.cmd
, I use a command like this:Since I'm running things direct, I go ahead and try:
Errors start to crop up do to the
utilities
package. I started to hunt them down and make changes, but one problem is that there's more than onenode_modules/utilities
folder. So, I quit trying to fix things that way.With
flow check
, it wants to resolve the use of functionsdesc
andtask
in a Jakefile, so I import, likeconst jake = require("jake")
, and then usejake.desc
andjake.task
.That makes
flow
happy, but I still end up having to make exceptions for Jake, rather than run it like a normal Node module.For example, I have a simple JS file that imports 20 or so modules, to test that they're in the right path. In that file, I can't do a
const jake = require("jake")
because my general node command isnode --use_strict
.There's not a problem. But I have big plans for Jake, to do a lot of JavaScript in a Jake file, thus the reason for using Flow with Jake.
Thanks.
The text was updated successfully, but these errors were encountered: