Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Commit

Permalink
Blocked by gruntjs/grunt#1108
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpodwysocki committed Jun 26, 2014
1 parent 5d9f936 commit 0572396
Show file tree
Hide file tree
Showing 8 changed files with 287 additions and 3 deletions.
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
RxJS-CLI
========
RxJS-CLI v0.0.1
===============

Reactive Extensions for JavaScript (RxJS) Command Line Interface
The [Reactive Extensions for JavaScript (RxJS)](https://github.com/Reactive-Extensions/RxJS) command-line interface for creating custom builds.

## Documentation ##

Coming Soon

## Installation ##

Using [npm](http://npmjs.org):

```bash
{sudo} npm i -g rx-cli
rx -h
```

## License ##

Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions
and limitations under the License.
3 changes: 3 additions & 0 deletions authors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Matthew Podwysocki <[email protected]>
Bart de Smet <[email protected]>
Erik Meijer <[email protected]>
92 changes: 92 additions & 0 deletions bin/rx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/env node

var grunt = require('grunt');
var program = require('commander');
var dependencies = require('../lib/dependencies.json');

// Program end
var requiredEnd = require('../lib/footer');

program
.version('0.0.1')
.option('-m, --methods <methods>', 'Include methods')
.option('-c, --compat', 'Create compat build');

program.on('--help', function(){
console.log(' Examples:');
console.log('');
console.log(' $ cli --methods create,filter,map,flatmap,takeuntil');
console.log(' $ cli -m create,filter,map,flatmap,takeuntil');
console.log('');
});

program.parse(process.argv);

var requiredFiles = [];
if (program.methods) {

// Expect commas to seperate methods
var files = program.methods.split(',');

for (var i = 0, len = files.length; i < len; i++) {
var file = files[i];

// TODO: Add each file
}
}

var requiredStart = program.compat ?
require('../lib/headercompat') :
require('../lib/header');

var totalFiles = requiredStart.concat(requiredFiles, requiredEnd);

var outputFile = 'rx.custom.js';
var outputMinFile = 'rx.custom.min.js';

grunt.initConfig({
pkg: grunt.file.readJSON('../node_modules/rx/package.json'),
meta: {
banner:
'/*'+
'Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.\r\n' +
'Microsoft Open Technologies would like to thank its contributors, a list.\r\n' +
'of whom are at http://aspnetwebstack.codeplex.com/wikipage?title=Contributors..\r\n' +
'Licensed under the Apache License, Version 2.0 (the "License"); you.\r\n' +
'may not use this file except in compliance with the License. You may.\r\n' +
'obtain a copy of the License at.\r\n\r\n' +
'http://www.apache.org/licenses/LICENSE-2.0.\r\n\r\n' +
'Unless required by applicable law or agreed to in writing, software.\r\n' +
'distributed under the License is distributed on an "AS IS" BASIS,.\r\n' +
'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or.\r\n' +
'implied. See the License for the specific language governing permissions.\r\n' +
'and limitations under the License..\r\n' +
'*/'
},
concat: {
main: {
src: totalFiles,
dest: outputFile
}
},
uglify: {
main: {
src: ['<banner>', outputFile],
dest: outputMinFile
}
}
});

// Load all "grunt-*" tasks
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');

// Default task
grunt.task.registerTask('custombuild', [
'concat:main',
'uglify:main'
]);

grunt.tasks([ 'custombuild' ], { gruntfile: false }, function () {
console.log('done');
});
31 changes: 31 additions & 0 deletions lib/dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"operators": [
{
"all": {
"source": "src/core/linq/observable/all.js",
"dependsOn": [
{ "where": "src/core/linq/observable/where.js" },
{ "any": "src/core/linq/observable/any.js" }
]
},
"amb": {
"source": "src/core/linq/observable/amb.js",
"dependsOn": []
},
"selectmany": {
"source": "src/core/linq/observable/selectmany.js",
"dependsOn": [
{ "select": "src/core/linq/observable/select.js" },
{ "mergeobservable": "src/core/linq/observable/mergeobservable.js"}
]
}
}
],
"aliases": [
{"every":"all"},
{"some":"any"},
{"flatmap":"selectmany"},
{"map":"select"},
{"filter":"where"}
]
}
11 changes: 11 additions & 0 deletions lib/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = [
'node_modules/rx/src/core/anonymousobservable.js',
'node_modules/rx/src/core/autodetachobserver.js',
'node_modules/rx/src/core/linq/groupedobservable.js',
'node_modules/rx/src/core/subjects/innersubscription.js',
'node_modules/rx/src/core/subjects/subject.js',
'node_modules/rx/src/core/subjects/asyncsubject.js',
'node_modules/rx/src/core/subjects/anonymoussubject.js',
'node_modules/rx/src/core/exports.js',
'node_modules/rx/src/core/outro.js'
];
37 changes: 37 additions & 0 deletions lib/header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = [
'node_modules/rx/src/core/license.js',
'node_modules/rx/src/core/intro.js',
'node_modules/rx/src/core/basicheader-modern.js',
'node_modules/rx/src/core/enumeratorheader.js',
'node_modules/rx/src/core/internal/isequal.js',
'node_modules/rx/src/core/internal/util.js',
'node_modules/rx/src/core/internal/priorityqueue.js',
'node_modules/rx/src/core/disposables/compositedisposable.js',
'node_modules/rx/src/core/disposables/disposable.js',
'node_modules/rx/src/core/disposables/booleandisposable.js',
'node_modules/rx/src/core/disposables/singleassignmentdisposable.js',
'node_modules/rx/src/core/disposables/serialdisposable.js',
'node_modules/rx/src/core/disposables/refcountdisposable.js',
'node_modules/rx/src/core/disposables/scheduleddisposable.js',
'node_modules/rx/src/core/concurrency/scheduleditem.js',
'node_modules/rx/src/core/concurrency/scheduler.js',
'node_modules/rx/src/core/concurrency/scheduleperiodicrecursive.js',
'node_modules/rx/src/core/concurrency/immediatescheduler.js',
'node_modules/rx/src/core/concurrency/currentthreadscheduler.js',
'node_modules/rx/src/core/concurrency/timeoutscheduler.js',
'node_modules/rx/src/core/concurrency/catchscheduler.js',
'node_modules/rx/src/core/notification.js',
'node_modules/rx/src/core/internal/enumerator.js',
'node_modules/rx/src/core/internal/enumerable.js',
'node_modules/rx/src/core/observer.js',
'node_modules/rx/src/core/abstractobserver.js',
'node_modules/rx/src/core/anonymousobserver.js',
'node_modules/rx/src/core/checkedobserver.js',
'node_modules/rx/src/core/scheduledobserver.js',
'node_modules/rx/src/core/observeonobserver.js',
'node_modules/rx/src/core/observable.js',
'node_modules/rx/src/core/linq/observable/create.js',
'node_modules/rx/src/core/linq/observable/empty.js',
'node_modules/rx/src/core/linq/observable/never.js',
'node_modules/rx/src/core/linq/observable/return.js'
];
38 changes: 38 additions & 0 deletions lib/headercompat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = [
'node_modules/rx/src/core/license.js',
'node_modules/rx/src/core/intro.js',
'node_modules/rx/src/core/basicheader.js',
'node_modules/rx/src/core/enumeratorheader.js',
'node_modules/rx/src/core/internal/isequal.js',
'node_modules/rx/src/core/internal/util.js',
'node_modules/rx/src/core/internal/polyfills.js',
'node_modules/rx/src/core/internal/priorityqueue.js',
'node_modules/rx/src/core/disposables/compositedisposable.js',
'node_modules/rx/src/core/disposables/disposable.js',
'node_modules/rx/src/core/disposables/booleandisposable.js',
'node_modules/rx/src/core/disposables/singleassignmentdisposable.js',
'node_modules/rx/src/core/disposables/serialdisposable.js',
'node_modules/rx/src/core/disposables/refcountdisposable.js',
'node_modules/rx/src/core/disposables/scheduleddisposable.js',
'node_modules/rx/src/core/concurrency/scheduleditem.js',
'node_modules/rx/src/core/concurrency/scheduler.js',
'node_modules/rx/src/core/concurrency/scheduleperiodicrecursive.js',
'node_modules/rx/src/core/concurrency/immediatescheduler.js',
'node_modules/rx/src/core/concurrency/currentthreadscheduler.js',
'node_modules/rx/src/core/concurrency/timeoutscheduler.js',
'node_modules/rx/src/core/concurrency/catchscheduler.js',
'node_modules/rx/src/core/notification.js',
'node_modules/rx/src/core/internal/enumerator.js',
'node_modules/rx/src/core/internal/enumerable.js',
'node_modules/rx/src/core/observer.js',
'node_modules/rx/src/core/abstractobserver.js',
'node_modules/rx/src/core/anonymousobserver.js',
'node_modules/rx/src/core/checkedobserver.js',
'node_modules/rx/src/core/scheduledobserver.js',
'node_modules/rx/src/core/observeonobserver.js',
'node_modules/rx/src/core/observable.js',
'node_modules/rx/src/core/linq/observable/create.js',
'node_modules/rx/src/core/linq/observable/empty.js',
'node_modules/rx/src/core/linq/observable/never.js',
'node_modules/rx/src/core/linq/observable/return.js'
];
43 changes: 43 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "rx-cli",
"title": "Reactive Extensions for JavaScript (RxJS) Command Line Interface",
"description": "RxJS Command Line for Custom Builds",
"version": "0.0.1",
"homepage": "https://github.com/Reactive-Extensions/RxJS-CLI",
"author": {
"name": "Cloud Programmability Team",
"url": "https://github.com/Reactive-Extensions/RxJS-CLI/blob/master/authors.txt"
},
"repository": {
"type": "git",
"url": "https://github.com/Reactive-Extensions/RxJS-CLI.git"
},
"licenses": [
{
"type": "Apache License, Version 2.0",
"url": "https://github.com/Reactive-Extensions/RxJS-CLI/blob/master/LICENSE"
}
],
"bugs": "https://github.com/Reactive-Extensions/RxJS-CLI/issues",
"dependencies": {
"rx": "*",
"commander": "*",
"grunt-cli": "*",
"grunt": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-concat": "*",
"load-grunt-tasks": "*"
},
"keywords": [
"RxJS",
"Rx",
"CLI"
],
"bin": {
"rx": "bin/rx"
},
"engines": {
"node": ">= 0.8.0"
},
"preferGlobal": true
}

0 comments on commit 0572396

Please sign in to comment.