Code Monkey home page Code Monkey logo

notes's Introduction

Notes

Sample applications, tests, and examples for Backbone.js.

Introduction

Notes is a simple personal note manager web application, written for the book Backbone.js Testing. This project introduces situation-specific versions of the application and tests to demonstrate an exemplary modern frontend web project - including the infrastructure, application and full test suite.

Installation

First, follow the instructions in INSTALL.md to get all of the core technologies needed for any parts of this project.

Then, clone this directory or fork your own version of the repository:

$ cd /PATH/TO/REPOS/
$ git clone https://github.com/FormidableLabs/notes.git

Projects

From there, you can find a sub-project (skeleton or full example) and follow the further instructions there.

Build

We test all changes with Travis CI. Here's our current build status:

Build Status

Development

The project assumes a REST backend, but has a localStorage version of the full and skeleton apps available by editing:

var useLs = true; // Use LocalStorage?

in the root gulpfile.js, and then running:

$ gulp replace:backend
$ gulp

The gh-pages branch (which also stores built files to source for serving) has this option enabled.

notes's People

Contributors

mel-quark avatar ryan-roemer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notes's Issues

Webpack / CommonJS: Follow-up work for a "full" implementation.

Ticket the following out and get going:

  • Implement a skeleton/webpack-cls
  • Decide if also going to implement a Gruntfile.js.
  • Update README with different information.
    • Source maps server / generation.
    • Gulpfile vs. Gruntfile.
    • Dev. server, watches, still some Browserify stuff there?

Travis: Fails on Karma/WS install.

> [email protected] install /home/travis/build/FormidableLabs/notes/skeleton/browserify/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/home/travis/build/FormidableLabs/notes/skeleton/browserify/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/validation.node
make: Leaving directory `/home/travis/build/FormidableLabs/notes/skeleton/browserify/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m�[35m�[0m cb() never called!
�[0m�[37m�[40mnpm�[0m �[0m�[31m�[40mERR!�[0m �[0m�[35mnot ok�[0m code 0
�[0mtravis_time:end:250fae50:start=1411921886951714571,finish=1411921992172173634,duration=105220459063
�[0K
�[31;1mThe command "npm install" failed and exited with 1 during .�[0m

Webpack / CommonJS: Test rebuilds.

Issues:

  • Caching: Running gulp dev and repeatedly changing app file rebuilds several of the bundles after second time. Maybe a re-map problem?

CascadiaJS 2014 - Notes Installation

Welcome CascadiaJS 2014 workshop participants!

This ticket will serve as our discussion forum for any issues you have installing the notes application following the instructions for:

Please comment below with issues you have and we'll work through them!

LocalStorage Notes errors on creating, then editing a note...

In my browser, after creating a new note, then going to "edit view" -- http://formidablelabs.github.io/notes/full/amd/app/#note/d4ae171f-970c-95fe-715b-5a4db1c8edf5/view -- bombs out with this error:

Uncaught TypeError: Cannot read property 'replace' of undefined bundle.js:109
makeHtml bundle.js:109
t.View.extend.render bundle.js:109
t.View.extend.initialize bundle.js:109
t.View bundle.js:106
r bundle.js:106
n.View.extend.initialize bundle.js:109
t.View bundle.js:106
r bundle.js:106
t.Router.extend.note bundle.js:109
n.extend.execute bundle.js:106
(anonymous function) bundle.js:106
(anonymous function) bundle.js:106
ct bundle.js:105
n.extend.loadUrl bundle.js:106
n.extend.start bundle.js:106
(anonymous function) bundle.js:109
(anonymous function) bundle.js:106
(anonymous function) bundle.js:106
l bundle.js:106
t.Events.trigger bundle.js:106
n.extend.reset bundle.js:106
e.success bundle.js:106
t.LocalStorage.sync.window.Store.sync.t.localSync bundle.js:106
t.sync bundle.js:106
n.extend.sync bundle.js:106
n.extend.fetch bundle.js:106
(anonymous function) bundle.js:109
l bundle.js:104
h.add bundle.js:104
Z.fn.ready bundle.js:104
Z.fn.init bundle.js:104
Z bundle.js:103
(anonymous function) bundle.js:109
context.execCb require.js:1650
Module.check require.js:866
Module.enable require.js:1143
context.enable require.js:1511
(anonymous function) require.js:1128
(anonymous function) require.js:132
each require.js:57
Module.enable require.js:1090
Module.init require.js:774
(anonymous function) require.js:1416

Check NPM `postinstall` for bower on windows.

From: http://www.meetup.com/seattlejs/events/178649462/comments/370256812/

Ran into an issue with the Windows setup -- it failed on a Linux-style path:

> [email protected] postinstall c:\PTDocuments\nodejs\training
> ./node_modules/.bin/bower install

'.' is not recognized as an internal or external command,
operable program or batch file.

npm ERR! [email protected] postinstall: `./node_modules/.bin/bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
...

I already had node installed, and it's a slightly older version -- v0.10.24 -- but that shouldn't affect whether Windows handles . in a path. :-)

I'm just looking into this, so asking in case anyone has already worked around this. Thanks!

Example Server: Get something live (localStorage or Heroku)

Since we've moved away from Backbone.localStorage we can't just statically host on gh-pages anymore. Task:

  • Get a version that does use localStorage and host that.

OR

  • Host a version of notes on Heroku.
    • We probably don't want a shared datastore (public unchecked input???). So, tie to session?

Full/AMD: Server code fails JsHint

The node server code in full|skeleton AMD was never JsHinted and fails in many places.

Tasks:

  • Add Jshint for server code to full/amd and skeleton/amd (via sync'ing) in Grunt.
  • Fix all JsHint errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.