Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 26, 2021. It is now read-only.
/rxmarblesPublic archive

Commit57e37f1

Browse files
author
Andre Medeiros
committed
Farewell CoffeeScript
We are breaking up. I'm sorry, it's not you, it's me. I really likeyou, but I feel like now is that time in my life where I grow upand face some big challenges and decisions.The first time I saw you, I couldn't take my eyes off of yourbeautiful list comprehensions. Your arrow functions were amazing.I bet you remember all the special moments we had together. It waspretty fantastic. It was love at first sight.You remind me of my parents, Mr. Python and Mrs. Ruby, who taughtme great things in life. But now, I can make my own decisionsindependently of my parents. As I said, there's nothing really wrongwith you. It's just that I need to go dangerous, I need to live thatadventure that every man is called to. To take my backpack and justgo, discover the world out there.With you, I don't have my freedom to name my own functions. I can'tmake classes the way I want to. You don't let me do that. And I knowyour intentions are the best, please don't get offended here. I knowyou are trying to save me against evil code and odd bugs. But I havegrown up and those aren't issues anymore. Also, in the end of theday, your generated JavaScript is just about 5% more verbose thanactual CoffeeScript code, so I don't see real benefit.I think I'll survive. This time, I actually believe I can JavaScript.I don't particularly like it, I miss you sometimes, my dear.But I got courage. This will be tough, but it's my destiny. It's whatI'm called to do. Sorry.
1 parentcf985c9 commit57e37f1

File tree

49 files changed

+2330
-3992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2330
-3992
lines changed

‎TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ DONE Render nondraggable Completion for output diagram
5050
DONE Controller logic to include completion time
5151
DONE Update examples with regard to completion time
5252
DONE New Model View Interpreter architecture, for OperatorsMenu
53+
TODO Replace CoffeeScript with JavaScript
5354
TODO Lower bound on completion time, no earlier than any marble time
5455
- Marble has a static subject for mousedown event, which covers all instances
5556
of marble. Each subject notification points to the marble instance's id. ALSO

‎dist/js/app.js

Lines changed: 1021 additions & 2874 deletions
Large diffs are not rendered by default.

‎dist/js/binder.js

Lines changed: 21 additions & 19 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎gulpfile.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
vargulp=require('gulp');
2-
varcoffee=require('gulp-coffee');
32
varless=require('gulp-less');
43
varbrowserify=require('gulp-browserify');
54
varuglify=require('gulp-uglify');
@@ -9,13 +8,6 @@ var path = require('path');
98

109
// Based on https://github.com/deepak1556/gulp-browserify/issues/7
1110

12-
gulp.task('coffee',function(){
13-
gutil.log(gutil.colors.yellow("Compiling CoffeeScript..."));
14-
returngulp.src(['./src/**/*.coffee'])
15-
.pipe(coffee({bare:true}).on('error',gutil.log))
16-
.pipe(gulp.dest('./build/src'));
17-
});
18-
1911
gulp.task('less',function(){
2012
gutil.log(gutil.colors.yellow("Compiling LESS styles..."));
2113
gulp.src('./styles/main.less')
@@ -25,19 +17,19 @@ gulp.task('less', function() {
2517
.pipe(gulp.dest('./dist/css'));
2618
});
2719

28-
gulp.task('dev-browserify',['coffee'],function(){
20+
gulp.task('dev-browserify',[],function(){
2921
gutil.log(gutil.colors.yellow("Packing with browserify..."));
30-
returngulp.src(['./build/src/**/*.js'])
22+
returngulp.src(['./src/**/*.js'])
3123
.pipe(browserify({
3224
insertGlobals:true,
3325
debug:true
3426
}))
3527
.pipe(gulp.dest('./build/browserified-js'));
3628
});
3729

38-
gulp.task('browserify',['coffee'],function(){
30+
gulp.task('browserify',[],function(){
3931
gutil.log(gutil.colors.yellow("Packing with browserify..."));
40-
returngulp.src(['./build/src/**/*.js'])
32+
returngulp.src(['./src/**/*.js'])
4133
.pipe(browserify({
4234
insertGlobals:false,
4335
debug:false,
@@ -57,7 +49,7 @@ gulp.task('uglify', ['browserify'], function() {
5749
gulp.task('post-clean-up',['uglify'],function(){
5850
gutil.log(gutil.colors.yellow("Cleaning up temporary files..."));
5951
returngulp.src(
60-
[__dirname+'/build/src/**/*',__dirname+'/build/browserified-js/**/*'],
52+
[__dirname+'/build/browserified-js/**/*'],
6153
{read:false}
6254
)
6355
.pipe(rimraf());
@@ -74,7 +66,7 @@ gulp.task('default', function() {
7466
gulp.run('dev-build');
7567

7668
gutil.log("Watching for changes...");
77-
gulp.watch(['./src/**/*.coffee','./styles/**/*.less'],function(event){
69+
gulp.watch(['./src/**/*.js','./styles/**/*.less'],function(event){
7870
if(event.path){
7971
gutil.log("Change detected in ",gutil.colors.magenta(event.path));
8072
}else{

‎package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
},
1818
"devDependencies": {
1919
"browserify":"~2.36.0",
20-
"coffeeify":"~0.6.0",
2120
"gulp":"~3.8.6",
2221
"gulp-browserify":"^0.5.0",
23-
"gulp-coffee":"^2.1.1",
2422
"gulp-less":"^1.3.2",
2523
"gulp-rimraf":"^0.1.0",
2624
"gulp-uglify":"^0.3.1",
@@ -30,7 +28,7 @@
3028
},
3129
"scripts": {
3230
"preinstall":"rm -rf build && rm -rf node_modules",
33-
"postinstall":"mkdir build && mkdir build/src &&ln -s ../build/src node_modules/rxmarbles && ln -s ../package.json node_modules/package.json",
31+
"postinstall":"ln -s ../src node_modules/rxmarbles && ln -s ../package.json node_modules/package.json",
3432
"update-gh-pages":"git checkout gh-pages && git merge master && rm dist/js/app.js && gulp build && git add dist/js/app.js && git commit --amend --no-edit && git push origin gh-pages && git checkout master"
3533
}
3634
}

‎src/app.coffee

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎src/app.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* App entry-point.
3+
*/
4+
varPackage=require('package.json');
5+
varbinder=require('rxmarbles/binder');
6+
varSandbox=require('rxmarbles/views/sandbox');
7+
varOperatorsMenuModel=require('rxmarbles/models/operators-menu');
8+
varOperatorsMenuView=require('rxmarbles/views/operators-menu');
9+
varOperatorsMenuInterpreter=require('rxmarbles/interpreters/operators-menu');
10+
varDOMDelegator=require('dom-delegator');
11+
varUtils=require('rxmarbles/views/utils');
12+
13+
vardomDelegator=DOMDelegator();
14+
15+
varsandboxContainer=document.querySelector(".js-sandboxContainer");
16+
sandboxContainer.innerHTML="";
17+
sandboxContainer.appendChild(Sandbox.render());
18+
19+
binder(OperatorsMenuModel,OperatorsMenuView,OperatorsMenuInterpreter);
20+
// binder(SandboxModel, SandboxView, SandboxInterpreter);
21+
22+
Utils.renderVTreeStream(OperatorsMenuView.vtree$,".js-operatorsMenuContainer");
23+
24+
varversionElement=document.querySelector("a.js-appVersion");
25+
versionElement.textContent="v"+Package.version;
26+
versionElement.href="https://github.com/staltz/rxmarbles/releases/tag/v"+Package.version;
27+
28+
varrxVersion=Package.dependencies.rx.replace(/(~|\^|\.\+)*/g,"");
29+
varrxElement=document.querySelector("a.js-rxjsVersion");
30+
rxElement.textContent="RxJS v"+rxVersion;
31+
rxElement.href="https://github.com/Reactive-Extensions/RxJS/tree/v"+rxVersion;

‎src/binder.coffee

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎src/binder.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Important Model-View-Interpreter binding function.
3+
*/
4+
module.exports=function(model,view,interpreter){
5+
view.observe(model);
6+
interpreter.observe(view);
7+
model.observe(interpreter);
8+
};

‎src/data/boolean-examples.coffee

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp