-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation
- Loading branch information
Marten Schilstra
committed
Feb 14, 2017
1 parent
71db5b9
commit c85d87c
Showing
3 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
# ember-cli-one-script | ||
|
||
This README outlines the details of collaborating on this Ember addon. | ||
This addon combines your `vendor.js` and `<your-app-name>.js` into a single | ||
file called `app.js`. | ||
|
||
## Installation | ||
You also need to update your `app/index.html`: | ||
|
||
* `git clone <repository-url>` this repository | ||
* `cd ember-cli-one-script` | ||
* `npm install` | ||
* `bower install` | ||
```html | ||
<!-- change the following --> | ||
<script src="{{rootURL}}assets/vendor.js"></script> | ||
<script src="{{rootURL}}assets/my-project.js"></script> | ||
<!-- to --> | ||
<script src="{{rootURL}}assets/app.js"></script> | ||
``` | ||
|
||
## Running | ||
## Want to help? | ||
|
||
* `ember serve` | ||
* Visit your app at [http://localhost:4200](http://localhost:4200). | ||
Please do! We are always looking to improve this library. Please see our | ||
[Contribution Guidelines](https://github.com/dockyard/ember-cli-one-script/blob/master/CONTRIBUTING.md) | ||
on how to properly submit issues and pull requests. | ||
|
||
## Running Tests | ||
## Legal | ||
|
||
* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions) | ||
* `ember test` | ||
* `ember test --server` | ||
[DockYard](http://dockyard.com/), Inc. © 2016 | ||
|
||
## Building | ||
[@dockyard](http://twitter.com/dockyard) | ||
|
||
* `ember build` | ||
|
||
For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/). | ||
[Licensed under the MIT license](http://www.opensource.org/licenses/mit-license.php) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
/* jshint node: true */ | ||
'use strict'; | ||
|
||
const concat = require('broccoli-concat'); | ||
const mergeTrees = require('broccoli-merge-trees'); | ||
|
||
module.exports = { | ||
name: 'ember-cli-one-script' | ||
name: 'ember-cli-one-script', | ||
|
||
postprocessTree(type, tree) { | ||
if (type !== 'all') { | ||
return tree; | ||
} | ||
|
||
return mergeTrees([tree, concat(tree, { | ||
headerFiles: [ | ||
'assets/vendor.js', | ||
`assets/${this.project.pkg.name}.js` | ||
], | ||
outputFile: 'assets/app.js' | ||
})]); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
{ | ||
"name": "ember-cli-one-script", | ||
"version": "0.0.0", | ||
"description": "The default blueprint for ember-cli addons.", | ||
"description": "This addon combines your `vendor.js` and `<your-app-name>.js` into a single file called `app.js`.", | ||
"keywords": [ | ||
"ember-addon" | ||
], | ||
"license": "MIT", | ||
"author": "", | ||
"repository": "", | ||
"author": "Marten Schilstra <[email protected]>", | ||
"repository": "https://github.com/DockYard/ember-cli-one-script", | ||
"dependencies": { | ||
"broccoli-concat": "^3.1.1", | ||
"broccoli-merge-trees": "^1.2.1" | ||
}, | ||
"engines": { | ||
"node": ">= 4.0.0" | ||
}, | ||
"ember-addon": { | ||
"configPath": "tests/dummy/config" | ||
"before": "broccoli-asset-rev" | ||
} | ||
} |