Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Commit f413fc3

Browse files
author
devrim
committed
new structure, prepping for dotcloud
1 parent 90d02b2 commit f413fc3

3,546 files changed

Lines changed: 105 additions & 558 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -29,58 +29,8 @@ ebin
2929
.project
3030
/kites/terminal/.tmp
3131

32-
# ignored node modules stuff (they need to be cake installed)
33-
/node_modules/.bin
34-
/node_modules/http-proxy
35-
/node_modules/bitly
36-
/node_modules/braintree
37-
/node_modules/browserify
38-
/node_modules/coffee-script
39-
/node_modules/cron
40-
/node_modules/dateformat
41-
/node_modules/dropbox
42-
/node_modules/eventemitter2
43-
/node_modules/everyauth
44-
/node_modules/express
45-
/node_modules/gzippo
46-
/node_modules/hashish
47-
/node_modules/hat
48-
/node_modules/http-proxy
49-
/node_modules/inspect
50-
/node_modules/jsonify
51-
/node_modules/ldapjs
52-
/node_modules/jsonify
53-
/node_modules/log
54-
/node_modules/log4js
55-
/node_modules/mongodb
56-
/node_modules/mongoskin
57-
/node_modules/mysql
58-
/node_modules/node-oauth
59-
/node_modules/node-pusher
60-
/node_modules/nodemailer
61-
/node_modules/nodeunit
62-
/node_modules/optimist
63-
/node_modules/postmark
64-
/node_modules/profiler
65-
/node_modules/request
66-
/node_modules/stylus
67-
/node_modules/underscore
68-
/node_modules/url
69-
/node_modules/validator
70-
/node_modules/terminaljs-lite
71-
/node_modules/terminaljs-lite_
72-
/node_modules/jsonify
73-
/node_modules/browserify
74-
/node_modules/cron
75-
/node_modules/.DS_Store
76-
/node_modules/csv
77-
/node_modules/process
78-
node_modules/cron/
79-
/node_modules/libxml-to-js
80-
/node_modules/colors
81-
/node_modules/commander
32+
/node_modules/*
8233

83-
# Ignored modules end. do not add stuff inside ignored modules. above or below is ok.
8434

8535
*.dump
8636
*.orig

Cakefile

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@ option '-C', '--buildClient', 'override buildClient flag with yes'
66
option '-B', '--configureBroker', 'should it configure the broker?'
77
option '-c', '--configFile [CONFIG]', 'What config file to use.'
88

9+
{spawn, exec} = require 'child_process'
10+
# mix koding node modules into node_modules
11+
exec "ln -sf `pwd`/node_modules_koding/* `pwd`/node_modules",(a,b,c)->
12+
# can't run the program if this fails,
13+
if a or b or c
14+
console.log "Couldn't mix node_modules_koding into node_modules, exiting. (failed command: ln -sf `pwd`/node_modules_koding/* `pwd`/node_modules)"
15+
process.exit(0)
16+
17+
918
ProgressBar = require './builders/node_modules/progress'
1019
Builder = require './builders/Builder'
1120
S3 = require './builders/s3'
1221
log4js = require "./builders/node_modules/log4js"
13-
log = log4js.getLogger("[Cakefile]")
22+
log = log4js.getLogger("[Main]")
1423
prompt = require './builders/node_modules/prompt'
1524
hat = require "./builders/node_modules/hat"
1625
mkdirp = require './builders/node_modules/mkdirp'
@@ -20,7 +29,6 @@ sourceCodeAnalyzer = new (require "./builders/SourceCodeAnalyzer.coffee")
2029
processes = new (require "processes") main:true
2130
closureCompile = require 'koding-closure-compiler'
2231
{daisy} = require 'sinkrow'
23-
{spawn, exec} = require 'child_process'
2432
fs = require "fs"
2533
http = require 'http'
2634
url = require 'url'
@@ -29,6 +37,24 @@ Watcher = require "koding-watcher"
2937

3038
KODING_CAKE = './node_modules/koding-cake/bin/cake'
3139

40+
41+
# announcement section, don't delete it. comment out old announcements, make important announcements from here.
42+
console.log "###############################################################"
43+
console.log "# ANNOUNCEMENT: CODEBASE FOLDER STRUCTURE HAS CHANGED #"
44+
console.log "# ----------------------------------------------------------- #"
45+
console.log "# 1- node_modules_koding is now where we store our node #"
46+
console.log "# modules. ./node_modules dir is completely ignored. #"
47+
console.log "# ./node_modules_koding is symlinked/mixed into #"
48+
console.log "# node_modules so you can use it as usual. Just don't #"
49+
console.log "# make a new one in ./node_modules, it will be ignored. #"
50+
console.log "# ----------------------------------------------------------- #"
51+
console.log "# 2- `cake install` is now equivalent to `npm install` #"
52+
console.log "# ----------------------------------------------------------- #"
53+
console.log "# 3- do NOT `npm install [module]` add to package.json #"
54+
console.log "# and do another `npm install` or you will mess deploy. #"
55+
console.log "# ----------------------------------------------------------- #"
56+
console.log "# questions and complaints 1-877-DEVRIM #"
57+
console.log "###############################################################"
3258
# log =
3359
# info : console.log
3460
# debug : console.log
@@ -37,7 +63,8 @@ KODING_CAKE = './node_modules/koding-cake/bin/cake'
3763

3864
# create required folders
3965
mkdirp.sync "./.build/.cache"
40-
# fs.writeFileSync "./.revision","0.0.1"
66+
67+
4168

4269
# get current version
4370
version = (fs.readFileSync ".revision").toString().replace("\r","").replace("\n","")
@@ -60,7 +87,7 @@ clientFileMiddleware = (options, code, callback)->
6087
kdjs = "var KD = {};\n" +
6188
"KD.config = "+JSON.stringify(options.runtimeOptions)+";\n"+
6289
kdjs
63-
90+
6491
if minify
6592
closureCompile (libraries+kdjs),(err,data)->
6693
unless err
@@ -208,7 +235,7 @@ task 'buildforproduction','set correct flags, and get ready to run in production
208235
invoke 'buildForProduction'
209236

210237
task 'buildForProduction','set correct flags, and get ready to run in production servers.',(options)->
211-
238+
212239
config = require './config/prod.coffee'
213240

214241
prompt.start()
@@ -263,7 +290,7 @@ run =(options)->
263290
stdout : process.stdout
264291
stderr : process.stderr
265292
verbose : yes
266-
293+
267294
processes.run
268295
name : 'serverCake'
269296
cmd : "#{KODING_CAKE} ./server -c #{configFile}#{debug} run"
@@ -328,7 +355,7 @@ configureVhost =(config, callback)->
328355
else throw e
329356

330357
task 'run', (options)->
331-
invoke 'checkModules'
358+
# invoke 'checkModules'
332359
configFile = normalizeConfigPath expandConfigFile options.configFile
333360
config = require configFile
334361

@@ -356,7 +383,7 @@ task 'buildAll',"build chris's modules", ->
356383
buildables = ["processes","pistachio","scrubber","sinkrow","mongoop","koding-dnode-protocol","jspath","bongo-client"]
357384
# log.info "building..."
358385
b = (next) ->
359-
cmd = "cd ./node_modules/#{buildables[next]} && cake build"
386+
cmd = "cd ./node_modules_koding/#{buildables[next]} && cake build"
360387
log.info "building... cmd: #{cmd}"
361388
processes.run
362389
cmd : cmd
@@ -379,17 +406,17 @@ task 'resetGuests', (options)->
379406
resetGuests configFile
380407

381408
task 'install', 'install all modules in CakeNodeModules.coffee, get ready for build',(options)->
382-
l = (d) -> log.info d.replace /\n+$/, ''
383-
{our_modules, npm_modules} = require "./CakeNodeModules"
384-
reqs = npm_modules
385-
for name,ver of reqs
386-
processes.run
387-
name : "#{name}@#{ver}"
388-
cmd : "npm i #{name}@#{ver}"
389-
restart : no
390-
stdout : process.stdout
391-
stderr : process.stderr
392-
verbose : yes
409+
# l = (d) -> log.info d.replace /\n+$/, ''
410+
# {our_modules, npm_modules} = require "./CakeNodeModules"
411+
# reqs = npm_modules
412+
# for name,ver of reqs
413+
processes.run
414+
name : "npm install"
415+
cmd : "npm install"
416+
restart : no
417+
stdout : process.stdout
418+
stderr : process.stderr
419+
verbose : yes
393420
# exe = ("npm i "+name+"@"+ver for name,ver of reqs).join ";\n"
394421
# a = exec exe,->
395422
# a.stdout.on 'data', l

dotcloud.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
webServer:
2+
type: nodejs
3+
approot: hellonode
4+
config:
5+
node_version : v0.8.x

node_modules/bongo-client/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.gitignore.orig

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

node_modules/bongo-client/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js.orig

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

node_modules/koding-dnode/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.gitignore.orig

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

node_modules/koding-dnode/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js.orig

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

node_modules/koding-dnode/node_modules/express/node_modules/mkdirp/.gitignore.orig

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

node_modules/koding-dnode/node_modules/express/node_modules/mkdirp/examples/pow.js.orig

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

node_modules/koding-dnode/node_modules/tap/node_modules/mkdirp/.gitignore.orig

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

0 commit comments

Comments
 (0)