this is the root project and contains all modules which you need to build koding frontend.
npm install
This will also install dependencies of builder and landing.
A ./configure step is required to write git revision id into .config.json file that builder depends on.
λ dev/koding HOST=xyz.koding.io PORT=8090 make configure(If you are using remotepot in development, make sure you have run ./configure in same commit both on your localhost and on your vm.)
Following will start the koding application and client builder in watch mode:
λ dev/koding make runOr, if you haven't run configure yet:
λ dev/koding HOST=xyz.koding.io PORT=8090 make allYou can also ./run backend only which is the prefered way to develop frontend:
λ dev/koding make backend
λ dev/koding make -C client allFrontend application is being built by builder and it has a bunch of options that you won't probably need to alter since the most general purpose combinations are pre-configured in Makefile.
Watch scripts, styles & sprites and recompile/transpile upon changes:
λ koding/client make watchCreating source maps is kinda expensive, so they are disabled by default.
If you don't mind slower builds in watch mode and need source maps, try this:
λ koding/client EXTRAS="--debug-js --debug-css" make watchIf you want to have your source maps inlined, but no watch mode:
λ koding/client make debugMinify scripts and styles:
λ koding/client make minifyMinify scripts and styles, but write source maps of scripts to an external .map file for production:
λ koding/client make productionVanilla:
λ koding/client make vanillaBuild landing:
λ koding/client make landing
And finally there are make all and make dist which are simply aliases for make landing development and make landing production respectively.
You can also pass additional builder arguments using EXTRAS variable.
Start in debug mode omitting scripts:
λ dev/koding/client EXTRAS=--no-scripts make debug
Start in watch mode, but do no watch sprites and play sound with notifications:
λ dev/koding/client EXTRAS="--no-watch-sprites --notify-sound" make watch
A module's directory tree looks like this:
├── Readme.md
├── bant.json
└── lib
├── styl
│ ├── x.styl
├── sprites
│ ├── 1x
│ │ ├── x.png
│ ├── 2x
│ │ ├── x.png
├── x.coffee
To run browser tests, type:
λ koding/client npm testor
λ koding/client make testIf you have a Selenium server started already on your machine, type:
λ koding/client TEST_EXTRAS=--no-start-selenium make testIf your web server is not running on localhost, you can specify its url like this:
λ koding/client TEST_EXTRAS="--url http://xyz.koding.io:8090" make testRead more about browser tests and test configuration cli here.
A module folder must contain this file in order to get built. You can read more about the bant spec here in this nice project site of bantjs.
Our special purpose fields are;
routesto define route mapsspritesto define sprite foldersstylesto define style folders
This file is a some sort of virtual module that is exposed as globals which you can require in run-time.
globals = require 'globals'You can also extend this object from a bant.json file by adding a globals field in it, which is the prefered method if you know only this module going to need that particular data.
This file is generated with ./configure with an initial value of a git revision id. It is crucial that both builder and web servers have the same value of it.
If this file does not exist, builder will re-create it, but with an hardcoded revision id and things will mess up. That's why .config.json must be generated with ./configure.
This file is also being used to cache models schema, so subsequent makes won't call bongo api again if there is already a schema field exists in this file.
thirdparty folder contains third-party dependencies that are not possible to install using npm.
For future dependencies; please keep in mind that this folder should only be used as the last resort. If the library that you want to install doesn't exist in npm registry, and if it is not a requirejs module or something; please port it to commonjs and publish it on npm.
assets folder is copied into public directory of our application. So whatever you want to keep in there you can drop it in here and it will be automatically copied. Black magic.
landing is not a module, it is a giant octopus with 7 hearts and 32 tentacles and a detachable penis.
2015 Koding, Inc