Comments (6)
This is the same thing we already discussed. Rollup and webpack can both do this.
I think we should write into the v2 addon spec that all ember addons are required to be "side effect free" in the sense that this kind of transformation is safe. Then we can trust this pattern.
So ok, yes, let's design better imports. My remaining design concern is logical groupings. If we collapse things down too far people can't see what is a transition vs motion vs easing vs some other helper function provided by the library. One idea is to group into:
ember-animated
for the things that are already on the top-levelember-animated/motions
to reexport all the motionsember-animated/transitions
to reexport all the transitionsember-animated/easings
to reexport all the easings
from ember-animated.
Super excited to think about standardizing around this in the wider community π
I had the same thought, that
import { fade, fadeIn } from 'ember-animated';
would be confusing, since one is a motion and another is a transition.
I think your grouping idea makes perfect sense! π
from ember-animated.
I just learned about that spec and I think it's great.
Do you think it would be possible to craft an ESLint rule that detects exported functions with side-effects, at least some of them?
from ember-animated.
We can lint for some potentially tempting Ember-specific things, like reopening a framework-provided class. But we definitely can't catch it all.
If these things were statically detectable, the whole problem would be a non-problem because instead of linting you could do the analysis in the module bundlers and they could automatically know which code is safe to strip.
from ember-animated.
I understand why they are not statically detectable (otherwise it'd be part of the language spec), but in that case how do the Webpack/Rollup features work?
from ember-animated.
Webpack makes npm package authors certify that theyβre safe by setting a value in package.json.
from ember-animated.
Related Issues (20)
- [DOCS] Initial homepage for ember-animated has too much whitespace between lines HOT 1
- Embroider Compatibility: animated-container's dynamic Tag breaks build HOT 3
- Information on testing ember-animated in docs HOT 2
- Why do we need `assert-never` in `dependencies`? HOT 2
- Ember Global deprecation warning due to old version of ember-cli-babel in ember-animated HOT 2
- Consider public export of TransitionContext type HOT 1
- Attempted to resolve -element, which was expected to be a helper, but nothing was found HOT 5
- Embroider: ember-animated is trying to import from rsvp but that is not one of its explicit dependencies HOT 1
- 1.x breaks animated-outlet HOT 10
- TypeError: yield* (intermediate value)(intermediate value) is not iterable after removing IE11 from transpilation targets HOT 1
- `startTranslatedBy` and `endTranslatedBy` modify the initial and final bounds width/height
- AnimatedOrphans' documentation looks broken HOT 2
- Memory leak in emberAnimatedSingleton HOT 6
- Incompatibility with ember-element-helper v0.6.1 and Embroider optimized HOT 8
- Types are not resolveable with sufficiently new enough TypeScript
- Error after upgrade from `1.0.4` to `1.1.0` HOT 3
- Glint ember-animated/template-registry not found HOT 2
- v1.1.3 is missing type declarations HOT 4
- Documentation code examples rendering wrong
- App broken after upgrade from 2.0.0 to 2.0.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-animated.