Closed jaericson closed 4 years ago
Whoops, looks like it's complaining about the spread operator usage. Maybe I need to revert back to using xtend
?
Whoops, looks like it's complaining about the spread operator usage.
Looks like eslint is what is having the problem. I think there's a way to fix that.
Yeah, adding this to .eslintrc
will do it:
"parserOptions": {
"ecmaVersion": 2018
},
ref https://eslint.org/docs/user-guide/configuring#specifying-parser-options
Is there any reason we should make the default instead be to include stretch metadata, if present?
👍 I'd be happy with it being enabled by default
I'd be happy with it being enabled by default
@jseppi Great! Do you think we should rename the property to something like ignoreStretchMetadata
so that omitting the property still means false?
Do you think we should rename the property to something like ignoreStretchMetadata so that omitting the property still means false?
oof, that's a long name!
I don't actually have a strong preference, but I think you could also keep it as stretchMedata
and defult to true
by doing something like this:
options.stretchMedata = options.stretchMetadata !== undefined ? options.stretchMetadata : true
Adds
stretchMetadata
as an optional option togenerateLayout
andgenerateLayoutUnique
. If set totrue
, the resulting layout object will contain the following stretch metadata properties, if present:content
,stretchX
, andstretchY
.This leverages work from https://github.com/mapbox/spritezero/pull/68.
TODO: