Skip to content

Commit cc758ef

Browse files
committed
Initial commit of addon
0 parents  commit cc758ef

File tree

5 files changed

+71
-0
lines changed

5 files changed

+71
-0
lines changed

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
7+
# dependencies
8+
/node_modules
9+
/bower_components
10+
11+
# misc
12+
/.sass-cache
13+
/connect.lock
14+
/coverage/*
15+
/libpeerconnection.log
16+
npm-debug.log
17+
testem.log

LICENSE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ember-CLI-uglify
2+
3+
This addon adds a minification step to the Ember-CLI build process

index.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* jshint node: true */
2+
'use strict';
3+
4+
module.exports = {
5+
name: 'ember-cli-uglify',
6+
included: function(app) {
7+
this._super.included.apply(this,arguments);
8+
9+
this.options = app.options;
10+
},
11+
postprocessTree: function(type, tree) {
12+
if(this.options.enabled === true) {
13+
var options = this.options.minifyJS.options || {};
14+
options.sourceMapConfig = this.options.sourcemaps;
15+
return require('broccoli-uglify-sourcemap')(tree, options);
16+
} else {
17+
return tree;
18+
}
19+
}
20+
};

package.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "ember-cli-uglify",
3+
"version": "0.1.0",
4+
"description": "JavaScript minification for Ember-CLI",
5+
"scripts": {
6+
"start": "ember server",
7+
"build": "ember build",
8+
"test": "ember test"
9+
},
10+
"repository": "",
11+
"engines": {
12+
"node": ">= 0.10.0"
13+
},
14+
"author": "",
15+
"license": "MIT",
16+
"keywords": [
17+
"ember-addon"
18+
],
19+
"dependencies": {
20+
"broccoli-uglify-sourcemap": "^0.2.1"
21+
}
22+
}

0 commit comments

Comments
 (0)