Comments (3)
Yes. A regexp would be more accurate. Some things to note though. In pods the module name will end with the type so we should modify the regexp to also accept modules that end with the type name (like myapp/company/model.js
). I also don't think we can rely on always having only one word before the type.
The inspector currently uses class detection (DS.Model.detect
) after getting the list to filter out false positives.
from ember-resolver.
Ah, interesting. I dug into the inspector code a little while trying to sort this out, but didn't catch that.
When you say you don't think we can rely on there only being one word before the type, do you mean something like myapp/models/supertype/subtype.js
or myapp/multi-named-pod/model.js
or myapp/my-pod/sub-pod/model.js
or something else entirely?
Assuming both those pods layouts are valid, I think RegExp('^[a-zA-Z0-9-_]+\/(.*)\/' + type + '$')
should work. I'd probably be inclined to keep the detection of pods and non-pods separate, just to avoid descending too far into the depths of regex hell.
from ember-resolver.
as of 3.0 this is now provided by ember (correctly)
from ember-resolver.
Related Issues (20)
- Local Lookup does not work for addons HOT 1
- Classic host app has to use MU resolver to allow local lookups in MU addons HOT 2
- MU resolver does not convert camelCase to kebap-case for `has` check
- Can't import styles from add-on after migrating to module unification structure in an ember app. HOT 2
- Please cut a new release to unblock "Could not find module `ember` imported from `resolver`" HOT 3
- ember-simple-auth can't resolve 'session' type HOT 6
- [Module Unification] Allow namespaced specifiers HOT 1
- 5.2.x angle-bracket (with angle-bracket-invocation-polyfill) component issues HOT 2
- Allow to prevent pods lookup of components
- Remove automatic dasherization of modifiers HOT 4
- Resolve index.js files in a directory with directory name HOT 1
- ERROR: You're not allowed to have more than one controller property map to the same query param key HOT 4
- ember-resolver/resolvers/classic/index.js: @ember/debug does not have a deprecate export HOT 6
- Resolver does not honor the loader noconflict aliases HOT 1
- Convert to TS or supply ambient definitions HOT 14
- @ember/string deprecation warnings HOT 4
- Figure out CI publishing HOT 1
- Support Ember 5 HOT 1
- Convert to v2 add-on format HOT 3
- Inline used @ember/string methods directly 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-resolver.