@fleetbase/ember-core 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +8 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  'use strict';
2
+ const path = require('path');
2
3
 
3
4
  module.exports = {
4
5
  name: require('./package').name,
@@ -19,8 +20,14 @@ module.exports = {
19
20
  };
20
21
  }
21
22
 
23
+ const importJs = (module, file, options) => {
24
+ const modulePath = path.dirname(require.resolve(module));
25
+ this.import(`${modulePath}/${file}`, options);
26
+ };
27
+
22
28
  // import socketcluster for use in all fleetbase engines
23
29
  // this will become globally available as socketClusterClient
24
- app.import('node_modules/socketcluster-client/socketcluster-client.min.js');
30
+ importJs('socketcluster-client', 'socketcluster-client.min.js');
31
+ // app.import('node_modules/socketcluster-client/socketcluster-client.min.js');
25
32
  },
26
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetbase/ember-core",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Provides all the core services, decorators and utilities for building a Fleetbase extension for the Console.",
5
5
  "keywords": [
6
6
  "fleetbase-extension",