-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- performance - reduced file-size - bugfixes - new build system [fixes #38, #34, #33, #28, #26, #18, #14, #9, #5]
- Loading branch information
1 parent
d7ec36b
commit b301f17
Showing
60 changed files
with
2,464 additions
and
6,422 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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/main.js | ||
/tmp | ||
/dist | ||
/docs |
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 |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
"expect" | ||
], | ||
|
||
"esnext": true, | ||
"proto": true, | ||
"node" : true, | ||
"browser" : true, | ||
|
||
|
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,5 @@ | ||
/node_modules/ | ||
/tmp | ||
/lib | ||
/tasks | ||
/test | ||
/vendor | ||
|
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"non-interactive": true, | ||
"dry-run": false, | ||
"verbose": false, | ||
"force": false, | ||
"pkgFiles": ["package.json", "bower.json"], | ||
"increment": "patch", | ||
"commitMessage": "Release %s", | ||
"tagName": "%s", | ||
"tagAnnotation": "Release %s", | ||
"buildCommand": "npm run-script build-all", | ||
"distRepo": "git@github.com:components/rsvp.js.git", | ||
"distStageDir": "tmp/stage", | ||
"distBase": "dist", | ||
"distFiles": ["**/*", "../package.json", "../bower.json"], | ||
"publish": false | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* jshint node:true, undef:true, unused:true */ | ||
var AMDFormatter = require('es6-module-transpiler-amd-formatter'); | ||
var closureCompiler = require('broccoli-closure-compiler'); | ||
var compileModules = require('broccoli-compile-modules'); | ||
var mergeTrees = require('broccoli-merge-trees'); | ||
var moveFile = require('broccoli-file-mover'); | ||
var es3Recast = require('broccoli-es3-safe-recast'); | ||
var concat = require('broccoli-concat'); | ||
var replace = require('broccoli-string-replace'); | ||
var calculateVersion = require('./lib/calculateVersion'); | ||
var path = require('path'); | ||
var trees = []; | ||
var env = process.env.EMBER_ENV || 'development'; | ||
|
||
var bundle = compileModules('lib', { | ||
inputFiles: ['es6-promise.umd.js'], | ||
output: '/es6-promise.js', | ||
formatter: 'bundle', | ||
}); | ||
|
||
trees.push(bundle); | ||
trees.push(compileModules('lib', { | ||
inputFiles: ['**/*.js'], | ||
output: '/amd/', | ||
formatter: new AMDFormatter() | ||
})); | ||
|
||
if (env === 'production') { | ||
trees.push(closureCompiler(moveFile(bundle, { | ||
srcFile: 'es6-promise.js', | ||
destFile: 'es6-promise.min.js' | ||
}), { | ||
compilation_level: 'ADVANCED_OPTIMIZATIONS', | ||
})); | ||
} | ||
|
||
var distTree = mergeTrees(trees.concat('config')); | ||
var distTrees = []; | ||
|
||
distTrees.push(concat(distTree, { | ||
inputFiles: [ | ||
'versionTemplate.txt', | ||
'es6-promise.js' | ||
], | ||
outputFile: '/es6-promise.js' | ||
})); | ||
|
||
if (env === 'production') { | ||
distTrees.push(concat(distTree, { | ||
inputFiles: [ | ||
'versionTemplate.txt', | ||
'es6-promise.min.js' | ||
], | ||
outputFile: '/es6-promise.min.js' | ||
})); | ||
} | ||
|
||
if (env !== 'development') { | ||
distTrees = distTrees.map(es3Recast); | ||
} | ||
|
||
distTree = mergeTrees(distTrees); | ||
var distTree = replace(distTree, { | ||
files: [ | ||
'es6-promise.js', | ||
'es6-promise.min.js' | ||
], | ||
pattern: { | ||
match: /VERSION_PLACEHOLDER_STRING/g, | ||
replacement: calculateVersion() | ||
} | ||
}); | ||
|
||
module.exports = distTree; |
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,43 +1,9 @@ | ||
# master | ||
# Master | ||
|
||
# 2.0.4 | ||
|
||
* Fix npm package | ||
|
||
# 2.0.3 | ||
|
||
* Fix useSetTimeout bug | ||
|
||
# 2.0.2 | ||
|
||
* Adding RSVP#rethrow | ||
* add pre-built AMD link to README | ||
* adding promise#fail | ||
# 2.0.0 | ||
|
||
# 2.0.1 | ||
* misc IE fixes, including IE array detection | ||
* upload passing builds to s3 | ||
* async: use three args for addEventListener | ||
* satisfy both 1.0 and 1.1 specs | ||
* Run reduce tests only in node | ||
* RSVP.resolve now simply uses the internal resolution procedure | ||
* prevent multiple promise resolutions | ||
* simplify thenable handling | ||
* pre-allocate the deferred's shape | ||
* Moved from Rake-based builds to Grunt | ||
* Fix Promise subclassing bug | ||
* Add RSVP.configure('onerror') | ||
* Throw exception when RSVP.all is called without an array | ||
* refactor RSVP.all to just use a promise directly | ||
* Make `RSVP.denodeify` pass along `thisArg` | ||
* add RSVP.reject | ||
* Reject promise if resolver function throws an exception | ||
* add travis build-status | ||
* correctly test and fix self fulfillment | ||
* remove promise coercion. | ||
* Fix infinite recursion with deep self fulfilling promises | ||
* doc fixes | ||
* re-sync with RSVP. Many large performance improvements and bugfixes. | ||
|
||
# 2.0.0 | ||
# 1.0.0 | ||
|
||
* No changelog beyond this point. Here be dragons. | ||
* first subset of RSVP |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env node | ||
|
||
// To invoke this from the commandline you need the following to env vars to exist: | ||
// | ||
// S3_BUCKET_NAME | ||
// TRAVIS_BRANCH | ||
// TRAVIS_TAG | ||
// TRAVIS_COMMIT | ||
// S3_SECRET_ACCESS_KEY | ||
// S3_ACCESS_KEY_ID | ||
// | ||
// Once you have those you execute with the following: | ||
// | ||
// ```sh | ||
// ./bin/publish_to_s3.js | ||
// ``` | ||
var S3Publisher = require('ember-publisher'); | ||
var configPath = require('path').join(__dirname, '../config/s3ProjectConfig.js'); | ||
publisher = new S3Publisher({ projectConfigPath: configPath }); | ||
|
||
// Always use wildcard section of project config. | ||
// This is useful when the including library does not | ||
// require channels (like in ember.js / ember-data). | ||
publisher.currentBranch = function() { | ||
return (process.env.TRAVIS_BRANCH === 'master') ? 'wildcard' : 'no-op'; | ||
}; | ||
publisher.publish(); | ||
|
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "es6-promise", | ||
"namespace": "Promise", | ||
"version": "2.0.0", | ||
"description": "A polyfill for ES6-style Promises, tracking rsvp", | ||
"authors": [ | ||
"Stefan Penner <stefan.penner@gmail.com>" | ||
], | ||
"main": "dist/es6-promise.js", | ||
"keywords": [ | ||
"promise" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/jakearchibald/ES6-Promises.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/jakearchibald/ES6-Promises/issues" | ||
} | ||
"license": "MIT", | ||
"ignore": [ | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"vendor", | ||
"tasks" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Using wildcard because es6-promise does not currently have a | ||
* channel system in place. | ||
*/ | ||
module.exports = function(revision,tag,date){ | ||
return { | ||
'es6-promise.js': | ||
{ contentType: 'text/javascript', | ||
destinations: { | ||
wildcard: [ | ||
'es6-promise-latest.js', | ||
'es6-promise-' + revision + '.js' | ||
] | ||
} | ||
}, | ||
'es6-promise.min.js': | ||
{ contentType: 'text/javascript', | ||
destinations: { | ||
wildcard: [ | ||
'es6-promise-latest.min.js', | ||
'es6-promise-' + revision + '.min.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/*! | ||
* @overview es6-promise - a tiny implementation of Promises/A+. | ||
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) | ||
* @license Licensed under MIT license | ||
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE | ||
* @version VERSION_PLACEHOLDER_STRING | ||
*/ |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
'use strict'; | ||
|
||
var fs = require('fs'); | ||
var path = require('path'); | ||
|
||
module.exports = function () { | ||
var packageVersion = require('../package.json').version; | ||
var output = [packageVersion]; | ||
var gitPath = path.join(__dirname,'..','.git'); | ||
var headFilePath = path.join(gitPath, 'HEAD'); | ||
|
||
if (packageVersion.indexOf('+') > -1) { | ||
try { | ||
if (fs.existsSync(headFilePath)) { | ||
var headFile = fs.readFileSync(headFilePath, {encoding: 'utf8'}); | ||
var branchName = headFile.split('/').slice(-1)[0].trim(); | ||
var refPath = headFile.split(' ')[1]; | ||
var branchSHA; | ||
|
||
if (refPath) { | ||
var branchPath = path.join(gitPath, refPath.trim()); | ||
branchSHA = fs.readFileSync(branchPath); | ||
} else { | ||
branchSHA = branchName; | ||
} | ||
|
||
output.push(branchSHA.slice(0,10)); | ||
} | ||
} catch (err) { | ||
console.error(err.stack); | ||
} | ||
return output.join('.'); | ||
} else { | ||
return packageVersion; | ||
} | ||
}; |
Oops, something went wrong.