Closed pixelass closed 6 years ago
Has this sorted itself out?
Because your project looks pretty good :+1:
Yes, sorry I forgot to close the ticket.
It took about a day to update for this repo.
Still wondering what's taking so long.
@rrrene
@pixelass Not sure. Where are you seeing this?
@rrrene Any idea why this is happening?
@pixelass On further inspection, I found out that the reason is that Inch CI uses InchJS, which can't parse the source because it does not understand ES6.
Parallazy (first mentioned repo) has a similar code base though and that one works now
@pixelass JSDoc, the underlying JS parser, is able to parse a subset of ES6. I do not know about plans/versions of JSDoc that do implement the missing features, but if you do, feel free submit a PR to InchJS :+1:
@rrrene thx so far. So you are asuming that I am using some code that is unsupported in this repository? I am pretty sure that the es6 features I am using are the same but I could obviously be wrong.
I'd be glad to look into helping out. This is an amazing service. Sadly I don't really understand how this works. Considering inchJS itself is not really documented makes it a lot harder to look for the right spot.
I looked into this a little more and saw that inch works on the lib
folder which in my case is valid ES5.
I also installed inchjs via npm and tried it locally.
...
"description": "Defaults for the main plugin.",
"type": {
"names": [
"object"
]
},
"properties": [
{
"type": {
"names": [
"object"
]
},
"description": "Mapping of class names to be used by the plugin.",
"name": "classNames"
},
{
"type": {
"names
[InchJS] Parsing failed.
It seems to happen at this line: https://github.com/pixelass/paraglider/blob/master/src/config.js#L44
This syntax however is something I use in other projects too.
Here's a part of the output before it fails:
"filename": "config.js",
"lineno": 54,
"path": "/Users/pixelass/Workspace/private/paraglider/lib",
"code": {
"id": "astnode100000069",
"name": "PLUGIN_DEFAULTS",
"type": "ObjectExpression",
"value": "{\"classNames\":\"\",\"onSlide\":null,\"onEnd\":null,\"speed\":250,\"spring\":100,\"snapBackAt\":0.25,\"threshold\":10,\"initialSlide\":0}"
}
The following part looks strange:
\"classNames\":\"\"
It should be
\"classNames\":classNames
which is what the actual code in my lib folder is.
var PLUGIN_DEFAULTS = {
classNames: classNames,
onSlide: null,
onEnd: null,
speed: 250,
spring: 100,
snapBackAt: 0.25,
threshold: 10,
initialSlide: 0
};
I'm not sure how this works but I'm guessing that Inchjs or jsdoc transpile into a virtual lib folder. Considering the syntax above requires "stage-2" the issue is probably that the local babel configuration is not respected.
What seems strange to me is that the following code would still be valid and should not cause an error.
var PLUGIN_DEFAULTS = {
"classNames": "",
"onSlide": null,
"onEnd": null,
"speed": 250,
"spring": 100,
"snapBackAt": 0.25,
"threshold": 10,
"initialSlide": 0
};
I also tried inchjs suggest lib/
but the same error occurs, which is strange because that pre generated folder contains valid ES5.
I hope this information helps figuring out what is causing the issue or how to work around it.
Moving away from Github. Feel free to reopen if interested.
The badge does not update. The link goes directly to build No.3 (There are currently 9 builds)
Repo: https://github.com/pixelass/parallazy Inch: https://inch-ci.org/github/pixelass/parallazy
Clicking on any build just brings me back to No.3
I changed the type (probably at build 3) because Inch did not recognize it automatically.