├── .gitignore
├── @ember
├── application
│ └── index.js
├── array
│ ├── index.js
│ └── proxy.js
├── component
│ └── index.js
├── controller
│ └── index.js
├── object
│ ├── computed.js
│ ├── index.js
│ ├── mixin.js
│ ├── observers.js
│ ├── promise-proxy-mixin.js
│ └── proxy.js
├── polyfills
│ └── index.js
├── routing
│ ├── route.js
│ └── router.js
├── runloop
│ └── index.js
├── service
│ └── index.js
└── utils
│ └── index.js
├── LICENSE
├── README.md
├── package.json
└── webpack.config.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | @ember-packages
3 |
--------------------------------------------------------------------------------
/@ember/application/index.js:
--------------------------------------------------------------------------------
1 | export * from '../../@ember-packages/@ember/-internals/owner';
2 |
--------------------------------------------------------------------------------
/@ember/array/index.js:
--------------------------------------------------------------------------------
1 | export * from '../../@ember-packages/@ember/-internals/runtime';
2 |
--------------------------------------------------------------------------------
/@ember/array/proxy.js:
--------------------------------------------------------------------------------
1 | export { ArrayProxy as default } from '.';
2 |
--------------------------------------------------------------------------------
/@ember/component/index.js:
--------------------------------------------------------------------------------
1 | export { Component as default } from '../../@ember-packages/@ember/-internals/glimmer';
2 |
--------------------------------------------------------------------------------
/@ember/controller/index.js:
--------------------------------------------------------------------------------
1 | export * from '../../@ember-packages/@ember/controller';
2 | export default from '../../@ember-packages/@ember/controller';
3 |
--------------------------------------------------------------------------------
/@ember/object/computed.js:
--------------------------------------------------------------------------------
1 |
2 | export {
3 | and,
4 | bool,
5 | collect,
6 | deprecatingAlias,
7 | empty,
8 | equal,
9 | filterBy,
10 | filter,
11 | gte,
12 | gt,
13 | intersect,
14 | lte,
15 | lt,
16 | mapBy,
17 | map,
18 | match,
19 | max,
20 | min,
21 | none,
22 | notEmpty,
23 | not,
24 | oneWay,
25 | or,
26 | readOnly,
27 | setDiff,
28 | sort,
29 | sum,
30 | union,
31 | uniqBy,
32 | uniq,
33 | oneWay as reads
34 | } from '../../@ember-packages/@ember/object/computed';
35 |
--------------------------------------------------------------------------------
/@ember/object/index.js:
--------------------------------------------------------------------------------
1 | export {
2 | alias,
3 | get,
4 | getProperties,
5 | set,
6 | setProperties,
7 | observer,
8 | isNone,
9 | isEmpty,
10 | Mixin,
11 | //computed - can't use it in Webstorm 2018.2.1 because of
12 | // `Initializer type ComputedProperty is not assignable to variable type string`
13 | _globalsComputed as computed
14 | } from '../../@ember-packages/@ember/-internals/metal';
15 |
16 | export {
17 | Object as EmberObject,
18 | Object as default,
19 | RegistryProxyMixin,
20 | ContainerProxyMixin,
21 | compare,
22 | copy,
23 | isEqual,
24 | Array as EmberArray,
25 | Copyable,
26 | MutableEnumerable,
27 | MutableArray,
28 | TargetActionSupport,
29 | Evented,
30 | PromiseProxyMixin,
31 | Observable,
32 | typeOf,
33 | isArray,
34 | _ProxyMixin,
35 | RSVP,
36 | Comparable,
37 | Namespace,
38 | Enumerable,
39 | ArrayProxy,
40 | ObjectProxy,
41 | ActionHandler,
42 | CoreObject,
43 | NativeArray,
44 | A
45 | } from '../../@ember-packages/@ember/-internals/runtime';
46 |
--------------------------------------------------------------------------------
/@ember/object/mixin.js:
--------------------------------------------------------------------------------
1 | export { Mixin as default } from '../../@ember-packages/@ember/-internals/metal';
2 |
--------------------------------------------------------------------------------
/@ember/object/observers.js:
--------------------------------------------------------------------------------
1 | export * from '../../@ember-packages/@ember/-internals/metal';
2 |
--------------------------------------------------------------------------------
/@ember/object/promise-proxy-mixin.js:
--------------------------------------------------------------------------------
1 | export { PromiseProxyMixin as default } from '../../@ember-packages/@ember/-internals/runtime';
2 |
--------------------------------------------------------------------------------
/@ember/object/proxy.js:
--------------------------------------------------------------------------------
1 | export { ObjectProxy as default } from '../../@ember-packages/@ember/-internals/runtime';
2 |
--------------------------------------------------------------------------------
/@ember/polyfills/index.js:
--------------------------------------------------------------------------------
1 | export * from '../../@ember-packages/@ember/polyfills';
2 |
--------------------------------------------------------------------------------
/@ember/routing/route.js:
--------------------------------------------------------------------------------
1 | export { Route as default } from '../../@ember-packages/@ember/-internals/routing';
2 |
--------------------------------------------------------------------------------
/@ember/routing/router.js:
--------------------------------------------------------------------------------
1 | export { Router as default } from '../../@ember-packages/@ember/-internals/routing';
2 |
--------------------------------------------------------------------------------
/@ember/runloop/index.js:
--------------------------------------------------------------------------------
1 | export * from '../../@ember-packages/@ember/runloop';
2 |
--------------------------------------------------------------------------------
/@ember/service/index.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | Creates a property that lazily looks up a service in the container. There
4 | are no restrictions as to what objects a service can be injected into.
5 |
6 | Example:
7 |
8 | ```app/routes/application.js
9 | import Route from '@ember/routing/route';
10 | import { inject as service } from '@ember/service';
11 |
12 | export default Route.extend({
13 | authManager: service('auth'),
14 |
15 | model() {
16 | return this.get('authManager').findCurrentUser();
17 | }
18 | });
19 | ```
20 |
21 | This example will create an `authManager` property on the application route
22 | that looks up the `auth` service in the container, making it easily
23 | accessible in the `model` hook.
24 |
25 | @method inject
26 | @static
27 | @since 1.10.0
28 | @for @ember/service
29 | @param {String=} name (optional) name of the service to inject, defaults to
30 | the property's name
31 | @param {InjectedPropertyOptions=} options
32 | @return {Ember.InjectedProperty} injection descriptor instance
33 | @public
34 | */
35 | export function inject(name, options) {
36 | //return new InjectedProperty('service', name, options);
37 | }
38 |
39 | export default from '../../@ember-packages/@ember/service';
40 |
--------------------------------------------------------------------------------
/@ember/utils/index.js:
--------------------------------------------------------------------------------
1 | export {
2 | alias,
3 | get,
4 | getProperties,
5 | set,
6 | setProperties,
7 | observer,
8 | isNone,
9 | isEmpty,
10 | Mixin,
11 | //computed - can't use it in Webstorm 2018.2.1 because of
12 | // `Initializer type ComputedProperty is not assignable to variable type string`
13 | _globalsComputed as computed
14 | } from '../../@ember-packages/@ember/-internals/metal';
15 |
16 | export {
17 | Object as EmberObject,
18 | Object as default,
19 | RegistryProxyMixin,
20 | ContainerProxyMixin,
21 | compare,
22 | copy,
23 | isEqual,
24 | Array as EmberArray,
25 | Copyable,
26 | MutableEnumerable,
27 | MutableArray,
28 | TargetActionSupport,
29 | Evented,
30 | PromiseProxyMixin,
31 | Observable,
32 | typeOf,
33 | isArray,
34 | _ProxyMixin,
35 | RSVP,
36 | Comparable,
37 | Namespace,
38 | Enumerable,
39 | ArrayProxy,
40 | ObjectProxy,
41 | ActionHandler,
42 | CoreObject,
43 | NativeArray,
44 | A
45 | } from '../../@ember-packages/@ember/-internals/runtime';
46 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Labuzov Dmitriy
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 | -----------------------------------------------------------------------------
24 | /@ember-packages subfolder:
25 |
26 | License from Ember.js (https://github.com/emberjs/ember.js/)
27 |
28 | Copyright (c) 2018 Yehuda Katz, Tom Dale and Ember.js contributors
29 |
30 | Permission is hereby granted, free of charge, to any person obtaining a copy of
31 | this software and associated documentation files (the "Software"), to deal in
32 | the Software without restriction, including without limitation the rights to
33 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
34 | of the Software, and to permit persons to whom the Software is furnished to do
35 | so, subject to the following conditions:
36 |
37 | The above copyright notice and this permission notice shall be included in all
38 | copies or substantial portions of the Software.
39 |
40 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
46 | SOFTWARE.
47 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This package will fix unresolved Ember.js imports like
2 | `import from '@ember/..'`
3 | for JetBrains IDEs (Idea, WebStorm, ...)
4 |
5 |
6 | # Installation
7 |
8 | In your project folder invoke:
9 |
10 | * `npm i intellij-emberjs-import-support --no-save`
11 | Note: double check that `intellij-emberjs-import-support` was not added to your `package.json` - this may lead to Ember.js' error:
12 | The `intellij-emberjs-import-support` addon could not be found at `../node_modules/intellij-emberjs-import-support`.
13 |
14 |
15 | * in the project's root create `webpack.config.js` file with the following content:
16 | ```javascript
17 | /* eslint-disable */
18 | const path = require('path');
19 |
20 | function aliasEmberDirs(appAlias) {
21 | const emberDirs = [
22 | '/application', '/array', '/component', '/controller', '/object', '/polyfills',
23 | '/service', '/routing', '/runloop', '/utils', ''
24 | ];
25 | const emberBaseDir = 'node_modules/intellij-emberjs-import-support/@ember';
26 | return emberDirs.reduce(function(result, dir) {
27 | result[`@ember${dir}`] = emberBaseDir + dir;
28 | return result;
29 | }, appAlias);
30 | }
31 |
32 | module.exports = {
33 | resolve: {
34 | modules: [
35 | path.join(__dirname, 'node_modules/intellij-emberjs-import-support/@ember-packages'),
36 | 'node_modules',
37 | ],
38 | root: path.resolve(__dirname),
39 | alias: aliasEmberDirs({
40 | 'myapp': 'app'
41 | // your application alias folders
42 | // for example: 'myapp': 'app', will allow you to `import { foo } from 'myapp/bar';`
43 | // where 'myapp/bar' is located in `app/bar` folder.
44 | })
45 | }
46 | };
47 | ```
48 | * Turn On Webpack support in JetBrains IDE:
49 | Preferences | Languages & Frameworks | JavaScript | Webpack
50 | and set the config file to `webpack.config.js` which was just created.
51 |
52 | That's it.
53 | `import { .. } from '@ember/..'` should be resolved by IDE now.
54 |
55 | # Improvements
56 |
57 | This package is not ready yet, so any help is appreciated.
58 |
59 | Feel free to create a Pull Requests with improvements / fixes.
60 |
61 |
62 | # Licenses
63 |
64 | This package is licensed under MIT.
65 | Copyright (c) 2019 Dmitriy Labuzov.
66 |
67 | It also contains /@ember-packages subfolder from Ember.js (https://github.com/emberjs/ember.js/)
68 | Which is also licensed under MIT.
69 | Copyright (c) 2019 Yehuda Katz, Tom Dale and Ember.js contributors
70 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "intellij-emberjs-import-support",
3 | "version": "0.2.0",
4 | "description": "Ember.js: support of `import from '@ember/..'` for JetBrains IDEs (Idea, WebStorm, ...)",
5 | "scripts": {
6 | "postinstall": "git clone --single-branch -b v3.6.1 https://github.com/emberjs/ember.js.git; mv ./ember.js/packages @ember-packages; rm -rf ./ember.js; find ./@ember-packages -name '*.d.ts' -exec rm {} +"
7 | },
8 | "repository": {
9 | "type": "git",
10 | "url": "git+https://github.com/arconamagi/intellij-emberjs-import-support.git"
11 | },
12 | "keywords": [
13 | "ember-addon",
14 | "IntelliJ",
15 | "webstorm"
16 | ],
17 | "author": "Dmitriy Labuzov ",
18 | "license": "MIT",
19 | "bugs": {
20 | "url": "https://github.com/arconamagi/intellij-emberjs-import-support/issues"
21 | },
22 | "homepage": "https://github.com/arconamagi/intellij-emberjs-import-support#readme"
23 | }
24 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | /* sample config */
2 | const path = require('path');
3 |
4 | function aliasEmberDirs(appAlias) {
5 | const emberDirs = [
6 | '/application', '/array', '/component', '/object',
7 | '/polyfills', '/service', '/routing', '/utils', ''
8 | ];
9 | const emberBaseDir = 'node_modules/intellij-emberjs-import-support/@ember';
10 | return emberDirs.reduce(function(result, dir) {
11 | result[`@ember${dir}`] = emberBaseDir + dir;
12 | return result;
13 | }, appAlias);
14 | }
15 |
16 | module.exports = {
17 | resolve: {
18 | modules: [
19 | path.join(__dirname, 'node_modules/intellij-emberjs-import-support/@ember-packages'),
20 | 'node_modules',
21 | ],
22 | root: path.resolve(__dirname),
23 | alias: aliasEmberDirs({
24 | 'src': 'app'
25 | // your application alias folders
26 | // for example: 'src': 'app', will allow you to `import { foo } from 'src/bar';`
27 | // where 'src/bar' is located in `app/bar` folder.
28 | })
29 | }
30 | };
31 |
--------------------------------------------------------------------------------