Use ember-auto-import instead of ember-browserify #138

Merged
galfert merged 3 commits from feature/use_ember_auto_import into master 2019-07-15 16:54:56 +00:00
7 changed files with 1929 additions and 674 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import ethers from 'npm:ethers';
import Kredits from 'npm:kredits-contracts';
import ethers from 'ethers';
import Kredits from 'kredits-contracts';
import RSVP from 'rsvp';
import Service from '@ember/service';
+1 -1
View File
@@ -1,5 +1,5 @@
import { computed } from '@ember/object';
import ethers from 'npm:ethers';
import ethers from 'ethers';
export default function(dependentKey, converterMethod) {
return computed(dependentKey, {
+1 -1
View File
@@ -1,5 +1,5 @@
import { computed } from '@ember/object';
import ethers from 'npm:ethers';
import ethers from 'ethers';
import formatKredits from 'kredits-web/utils/format-kredits';
export default function(dependentKey, options = {}) {
+1 -1
View File
@@ -1,4 +1,4 @@
import ethers from 'npm:ethers';
import ethers from 'ethers';
export default function(value, options = {}) {
let etherValue = ethers.utils.formatEther(value);
+17
View File
@@ -12,6 +12,23 @@ module.exports = function(defaults) {
sourcemaps: {
enabled: true,
extensions: ['js']
},
autoImport: {
webpack: {
module: {
rules: [
{
// inline json files instead of using fs.readFileSync
enforce: 'post',
test: /kosmos-schemas\/index\.js$/,
loader: 'transform-loader?brfs'
}
]
},
node: {
path: "empty" // needed for kosmos-schemas dependency
}
}
}
});
+1903 -668
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -28,10 +28,11 @@
"@ember/optional-features": "^0.6.3",
"babel-preset-es2015": "^6.22.0",
"babelify": "^7.3.0",
"brfs": "^2.0.2",
"broccoli-asset-rev": "^2.7.0",
"ember-ajax": "^4.0.1",
"ember-auto-import": "^1.5.2",
"ember-awesome-macros": "0.41.0",
"ember-browserify": "^1.1.13",
"ember-cli": "~3.8.1",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.1.2",
@@ -61,7 +62,9 @@
"kosmos-schemas": "^2.0.0",
fsmanuel commented 2019-07-15 15:55:47 +00:00 (Migrated from github.com)
Review
They use a frok: https://github.com/ipfs/js-ipfs-http-client/blob/master/package.json#L67
galfert commented 2019-07-15 15:58:33 +00:00 (Migrated from github.com)
Review

Any idea why I have to add the package at all when it's a dependency of a dependency?
I didn't have any error about it locally, but Travis did.

Any idea why I have to add the package at all when it's a dependency of a dependency? I didn't have any error about it locally, but Travis did.
fsmanuel commented 2019-07-15 16:36:31 +00:00 (Migrated from github.com)
Review

No. But the kredits-contracts dependencies are a mess. All kind of forks and beta releases... The blockchain community has to learn a lot about npm dependencies...

No. But the `kredits-contracts` dependencies are a mess. All kind of forks and beta releases... The blockchain community has to learn a lot about npm dependencies...
raucao commented 2019-07-15 16:45:40 +00:00 (Migrated from github.com)
Review

Aragon npm deps:

fail-imminent

Aragon npm deps: ![fail-imminent](https://user-images.githubusercontent.com/842/61233221-56521700-a730-11e9-9233-fcba4703ec5a.jpg)
"kredits-contracts": "^5.4.0",
"loader.js": "^4.7.0",
"ndjson": "github:hugomrdias/ndjson#feat/readable-stream3",
"qunit-dom": "^0.8.0",
"transform-loader": "^0.2.4",
"tv4": "^1.3.0"
},
"engines": {