Closed madeleineostoja closed 7 years ago
I don't think so, I'm also leaning towards pro #63 anyway. From a consumer's perspective, it seems more messy anyway. But maybe let's just decide on #63 and that will influence this one.
Well, whether we include build files or not doesn't really effect this
Ah yeah I get ya, we still need to build on postinstall
. Well I don't really care then honestly, I'm happy to change so long as the user doesn't have to type out dist
. They won't have to if we're using npm
/ unpkg
, as they direct by default to the main
prop in the package.json
I'm happy to change so long as the user doesn't have to type out dis
Hahaha that's literally the only thing this issue is about
And we'd build on prepublish
so that the build files are there for Unpkg. But yeah, let's take that to #63
Well yeah if we used bower
the user would have to type out dist
which is less clean than just building to the root IMO. But if we don't use bower
then the user won't have to type it so I'd be perfectly happy with this. My stance on this probably then relies on result of #63
But, either way, I'm not really that phased
But with Unpkg (which will be our majority use-case by a long margin since it's used in all our snippets), or more accurately just linking Simpla in with a script tag, the user will link in the built files, whether they're in the root or dist
Don't need to right? unpkg
points to the main
file: https://unpkg.com/cloudydom@1.0.6 === https://unpkg.com/cloudydom@1.0.6/cloudydom.min.js
The main
file would be simpla.js
, not simpla.min.js
(or simpla-lite.min.js
), which is what unpkg would want to link in.
I think you can also have a custom unpkg
field in package.json
, but that smells wrong to me. I think better just to let them link in whatever they want.
Anyway, all beside the point really. The question of this issue is whether it's cleaner to build to root or dist
. If you build to dist but then do everything possible to avoid using dist sounds like you don't want to build to dist haha
Yeah fair enough. I really don't mind honestly - I'm happy to let you make this call, doesn't bother me either way
Okay, let's just leave as is and build to root
Marginally related to #63, should Simpla build transpiled/bundled files to
dist/
rather than the root of the project? Purely a code organisation thing. Little cleaner, but would make linking in js file from the likes of Unpkg (which is the most common use-case, since that's what our snippet on simpla.io docs does) unnecessarily verbose.