Skip to content

Commit

Permalink
Remove bower deps (#26)
Browse files Browse the repository at this point in the history
* Remove bower

* Fix deps

* Phantom 2.1.1
  • Loading branch information
Exelord authored Apr 8, 2017
1 parent f7ccf4e commit a54b6b5
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 40 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cache:
directories:
- $HOME/.npm
- $HOME/.cache # includes bowers cache
- travis_phantomjs

env:
# we recommend testing LTS's and latest stable release (bonus points to beta/canary)
Expand All @@ -30,6 +31,14 @@ before_install:
- npm install phantomjs-prebuilt
- node_modules/phantomjs-prebuilt/bin/phantomjs --version

# Upgrade PhantomJS to v2.1.1.
- "export PHANTOMJS_VERSION=2.1.1"
- "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi"
- "if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
- "phantomjs --version"

install:
- npm install
- bower install
Expand Down
6 changes: 0 additions & 6 deletions blueprints/.jshintrc

This file was deleted.

8 changes: 0 additions & 8 deletions blueprints/ember-initials/index.js

This file was deleted.

1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "ember-initials",
"dependencies": {
"blueimp-md5": "^2.7.0"
}
}
29 changes: 25 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
/* jshint node: true */
'use strict';

const path = require('path');
const Funnel = require('broccoli-funnel');
const mergeTrees = require('broccoli-merge-trees');

module.exports = {
name: 'ember-initials',

included: function(app) {
this._super.included(app);

let shim = isFastBoot() ? 'md5-fastboot.js' : 'md5.js';

app.import(app.bowerDirectory + '/blueimp-md5/js/md5.min.js');
app.import('vendor/ember-initials/' + shim, {
app.import('vendor/ember-initials/md5.js');

app.import('vendor/ember-initials/shims/' + shim, {
type: 'vendor',
exports: { 'md5': ['md5'] }
exports: { md5: ['md5'] }
});
}
},

md5Path() {
return path.join(this.app.project.nodeModulesPath, 'blueimp-md5', 'js');
},

treeForVendor(tree) {
let trees = [tree];

trees.push(new Funnel(this.md5Path(), {
destDir: 'ember-initials',
files: ['md5.js']
}));

return mergeTrees(trees);
},
}

// Checks to see whether this build is targeting FastBoot. Note that we cannot
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"node": ">= 0.12.0"
},
"devDependencies": {
"blueimp-md5": "^2.7.0",
"bootstrap-sass": "^3.3.7",
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
Expand Down Expand Up @@ -65,7 +64,10 @@
"loader.js": "^4.0.10"
},
"dependencies": {
"ember-cli-babel": "^5.2.1"
"ember-cli-babel": "^5.2.1",
"broccoli-funnel": "1.1.0",
"broccoli-merge-trees": "1.2.4",
"blueimp-md5": "^2.7.0"
},
"fastbootDependencies": [
"md5"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global md5 */
define('md5', [], function() {
'use strict';

Expand Down
53 changes: 35 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ bluebird@^3.1.1, bluebird@^3.3.5, bluebird@^3.4.6:
version "3.4.7"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3"

blueimp-md5@^2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.7.0.tgz#7f518e0dd70467fefe28ecba398916092f2a02a9"

[email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.0.1.tgz#5ad0147099d13a9f38aa7b99af1d6e78666ed37f"
Expand Down Expand Up @@ -666,7 +670,7 @@ broccoli-funnel-reducer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/broccoli-funnel-reducer/-/broccoli-funnel-reducer-1.0.0.tgz#11365b2a785aec9b17972a36df87eef24c5cc0ea"

broccoli-funnel@^1.0.0, broccoli-funnel@^1.0.1, broccoli-funnel@^1.0.6, broccoli-funnel@^1.1.0:
broccoli-funnel@1.1.0, broccoli-funnel@^1.0.0, broccoli-funnel@^1.0.1, broccoli-funnel@^1.0.6, broccoli-funnel@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/broccoli-funnel/-/broccoli-funnel-1.1.0.tgz#dfb91a37c902456456de4a40a1881948d65b27d9"
dependencies:
Expand Down Expand Up @@ -710,6 +714,19 @@ broccoli-kitchen-sink-helpers@^0.3.1:
glob "^5.0.10"
mkdirp "^0.5.1"

[email protected]:
version "1.2.4"
resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-1.2.4.tgz#a001519bb5067f06589d91afa2942445a2d0fdb5"
dependencies:
broccoli-plugin "^1.3.0"
can-symlink "^1.0.0"
fast-ordered-set "^1.0.2"
fs-tree-diff "^0.5.4"
heimdalljs "^0.2.1"
heimdalljs-logger "^0.1.7"
rimraf "^2.4.3"
symlink-or-copy "^1.0.0"

broccoli-merge-trees@^1.0.0, broccoli-merge-trees@^1.1.0, broccoli-merge-trees@^1.1.1, broccoli-merge-trees@^1.1.3:
version "1.2.1"
resolved "https://registry.yarnpkg.com/broccoli-merge-trees/-/broccoli-merge-trees-1.2.1.tgz#16a7494ed56dbe61611f6c2d4817cfbaad2a3055"
Expand Down Expand Up @@ -4692,9 +4709,9 @@ read@1, read@~1.0.1, read@~1.0.7:
dependencies:
mute-stream "~0.0.4"

"readable-stream@1 || 2", readable-stream@^2, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
"readable-stream@1 || 2", readable-stream@^2, readable-stream@^2.0.2, readable-stream@~2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0"
Expand All @@ -4713,6 +4730,18 @@ [email protected]:
isarray "0.0.1"
string_decoder "~0.10.x"

"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.1.5, readable-stream@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "~1.0.0"
process-nextick-args "~1.0.6"
string_decoder "~0.10.x"
util-deprecate "~1.0.1"

readable-stream@~1.0.2:
version "1.0.34"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
Expand All @@ -4733,18 +4762,6 @@ readable-stream@~2.0.0, readable-stream@~2.0.5:
string_decoder "~0.10.x"
util-deprecate "~1.0.1"

readable-stream@~2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "~1.0.0"
process-nextick-args "~1.0.6"
string_decoder "~0.10.x"
util-deprecate "~1.0.1"

readdir-scoped-modules@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
Expand Down Expand Up @@ -4870,7 +4887,7 @@ request-progress@~2.0.1:
dependencies:
throttleit "^1.0.0"

request@2, request@^2.61.0, request@^2.65.0, request@~2.74.0:
request@2, request@^2.61.0, request@^2.65.0, request@^2.74.0, request@~2.74.0:
version "2.74.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.74.0.tgz#7693ca768bbb0ea5c8ce08c084a45efa05b892ab"
dependencies:
Expand All @@ -4896,7 +4913,7 @@ request@2, request@^2.61.0, request@^2.65.0, request@~2.74.0:
tough-cookie "~2.3.0"
tunnel-agent "~0.4.1"

request@^2.74.0, request@~2.79.0:
request@~2.79.0:
version "2.79.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
dependencies:
Expand Down

0 comments on commit a54b6b5

Please sign in to comment.