From caf8ed50953477fa7091260a62d55a0a0240f427 Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Thu, 21 Dec 2017 14:46:56 -0800 Subject: [PATCH] Import dependencies from NPM instead of Bower --- .travis.yml | 8 +------- README.md | 6 +++--- blueprints/ember-nf-graph/index.js | 11 ----------- bower.json | 7 ------- index.js | 15 +++++++++++++-- package.json | 5 ++++- yarn.lock | 23 +++++++++++++++++++---- 7 files changed, 40 insertions(+), 35 deletions(-) delete mode 100644 blueprints/ember-nf-graph/index.js delete mode 100644 bower.json diff --git a/.travis.yml b/.travis.yml index 15ac8e3..42ab32a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,17 +35,11 @@ matrix: allow_failures: - env: EMBER_TRY_SCENARIO=ember-canary -before_install: - - npm config set spin false - - npm install -g npm@4 bower - - npm --version - install: - yarn install - - bower install script: - - npm run lint:js + - yarn run lint:js # Usually, it's ok to finish the test scenario without reverting # to the addon's original dependency state, skipping "cleanup". - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup diff --git a/README.md b/README.md index 93cb48e..a70bed3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # ember-nf-graph -A Component-based DSL for creating graphs in your Ember app. The goal of the library is to +A Component-based DSL for creating graphs in your Ember app. The goal of the library is to create a set of components that allows application or component authors to build graphs in a compositional way. This includes components for templated axes, graph lines, areas, stacked areas, bar graphs, and much more. Check the [documentation](//netflix.github.io/ember-nf-graph/docs) for more information. @@ -66,7 +66,7 @@ export default Ember.Route.extend({ This set of Ember components requires [Ember-CLI](http://ember-cli.com) 0.2.0 or higher and [Ember](http://emberjs.com) 1.10.0 or higher. -To install, simply run `ember install ember-nf-graph`, or `npm install -D ember-nf-graph` +To install, simply run `ember install ember-nf-graph`, or `npm install -D ember-nf-graph` ## Documentation @@ -101,7 +101,7 @@ For more information on using ember-cli, visit [http://www.ember-cli.com/](http: This project uses YUIDoc to generate documentation. Once YUIDoc is installed run: ```sh -yuidoc -c yuidoc.json +yuidoc -c yuidoc.json ``` The documentation is located in `docs/`. diff --git a/blueprints/ember-nf-graph/index.js b/blueprints/ember-nf-graph/index.js deleted file mode 100644 index f11fc48..0000000 --- a/blueprints/ember-nf-graph/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/* globals module */ -module.exports = { - normalizeEntityName: function() {}, - - afterInstall: function() { - return this.addBowerPackagesToProject([ - { name: 'd3', target: '~3.5.17' }, - { name: 'rxjs', target: '~4.1.0' } - ]); - } -}; diff --git a/bower.json b/bower.json deleted file mode 100644 index 0e7b87c..0000000 --- a/bower.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "ember-nf-graph", - "dependencies": { - "d3": "~3.5.17", - "rxjs": "~4.1.0" - } -} diff --git a/index.js b/index.js index 0168be4..4e0b068 100644 --- a/index.js +++ b/index.js @@ -3,6 +3,17 @@ module.exports = { name: 'ember-nf-graph', + options: { + nodeAssets: { + d3: { + vendor: ['d3.js'] + }, + rx: { + vendor: ['dist/rx.all.js'] + } + } + }, + included: function(app) { this._super.included.apply(this, arguments); @@ -11,7 +22,7 @@ module.exports = { app = app.app; } - app.import(app.bowerDirectory + '/d3/d3.js'); - app.import(app.bowerDirectory + '/rxjs/dist/rx.all.js'); + app.import('vendor/d3/d3.js'); + app.import('vendor/rx/dist/rx.all.js'); } }; diff --git a/package.json b/package.json index b4adf5a..6b199fc 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,12 @@ "author": "Ben Lesh and contributors", "license": "Apache-2.0", "dependencies": { + "d3": "~3.5.17", "ember-cli-babel": "^6.6.0", "ember-cli-htmlbars": "^1.1.1", - "ember-cli-update": "^0.13.2" + "ember-cli-update": "^0.13.2", + "ember-cli-node-assets": "^0.2.2", + "rx": "~4.1.0" }, "devDependencies": { "benchpress": "^2.0.0-alpha.16", diff --git a/yarn.lock b/yarn.lock index acb0d0c..34fdbe0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1673,7 +1673,7 @@ broccoli-lint-eslint@^4.2.1: lodash.defaultsdeep "^4.6.0" md5-hex "^2.0.0" -broccoli-merge-trees@^1.0.0: +broccoli-merge-trees@^1.0.0, broccoli-merge-trees@^1.1.1: version "1.2.4" resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-1.2.4.tgz#a001519bb5067f06589d91afa2942445a2d0fdb5" dependencies: @@ -2351,6 +2351,10 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +d3@~3.5.17: + version "3.5.17" + resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" + dag-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/dag-map/-/dag-map-2.0.2.tgz#9714b472de82a1843de2fba9b6876938cab44c68" @@ -2690,6 +2694,17 @@ ember-cli-lodash-subset@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/ember-cli-lodash-subset/-/ember-cli-lodash-subset-2.0.1.tgz#20cb68a790fe0fde2488ddfd8efbb7df6fe766f2" +ember-cli-node-assets@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/ember-cli-node-assets/-/ember-cli-node-assets-0.2.2.tgz#d2d55626e7cc6619f882d7fe55751f9266022708" + dependencies: + broccoli-funnel "^1.0.1" + broccoli-merge-trees "^1.1.1" + broccoli-source "^1.1.0" + debug "^2.2.0" + lodash "^4.5.1" + resolve "^1.1.7" + ember-cli-normalize-entity-name@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ember-cli-normalize-entity-name/-/ember-cli-normalize-entity-name-1.0.0.tgz#0b14f7bcbc599aa117b5fddc81e4fd03c4bad5b7" @@ -4761,7 +4776,7 @@ lodash@^4.0.0, lodash@^4.3.0, lodash@^4.6.1, lodash@^4.8.0, lodash@~4.11.1: version "4.11.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.11.2.tgz#d6b4338b110a58e21dae5cebcfdbbfd2bc4cdb3b" -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0: +lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.5.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -5917,7 +5932,7 @@ resolve@^1.1.2, resolve@^1.1.6: dependencies: path-parse "^1.0.5" -resolve@^1.3.0, resolve@^1.3.3, resolve@^1.5.0: +resolve@^1.1.7, resolve@^1.3.0, resolve@^1.3.3, resolve@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" dependencies: @@ -6000,7 +6015,7 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -rx@^4.1.0: +rx@^4.1.0, rx@~4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"