diff --git a/.gitignore b/.gitignore index 5d8a5a2..c408720 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,10 @@ bower_components/ node_modules/ out/ +# Private Files +.env + + # ===================================== # CUSTOM MODIFICATIONS diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..643c399 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,63 @@ +{ + // enforcing options + "bitwise": true, + "camelcase": true, + "curly": false, // we like one liners + "eqeqeq": true, + "es3": true, + "forin": true, + "freeze": true, + "immed": true, + "indent": 1, // we use tabs + "latedef": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonbsp": true, + "nonew": true, + "plusplus": false, // we are good at js + "quotmark": false, // we like flexibility + "undef": true, + "unused": true, + "strict": true, + "trailing": true, + "maxparams": false, // no + "maxdepth": false, // no + "maxstatements": false, // no + "maxcomplexity": false, // no + "maxlen": false, // no + + // relaxing options + "asi": true, // we use asi + "boss": true, // we understand assignments + "debug": false, + "eqnull": true, // we know how to do null/undefined checks + "esnext": false, + "evil": false, + "expr": false, + "funcscope": false, + "gcl": true, + "globalstrict": false, + "iterator": false, + "lastsemic": false, + "laxbreak": false, + "laxcomma": false, + "loopfunc": false, + "moz": false, + "multistr": false, + "notypeof": false, + "proto": false, + "scripturl": false, + "smarttabs": false, // default; spaces should only be mixed with tabs after words + "shadow": false, + "sub": false, + "supernew": false, + "noyield": false, + + // environments + "browser": true, + "node": true, + + // legacy + "onevar": false +} diff --git a/.npmignore b/.npmignore index 91caedf..04f814f 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,4 @@ -# v1.3.10 December 10, 2013 +# v1.3.23 October 11, 2014 # https://github.com/bevry/base # Temp Files @@ -11,7 +11,14 @@ components/ bower_components/ node_modules/ +# Private Files +.env + # Development Files +.editorconfig +.eslintrc +.jshintrc +coffeelint.json .travis* Cakefile Makefile diff --git a/.travis.yml b/.travis.yml index 54f953e..9eab201 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,12 @@ -# v1.3.14 February 6, 2014 +# v1.3.23 October 11, 2014 # https://github.com/bevry/base language: node_js -install: "npm install; ./node_modules/.bin/cake install" +# ensure npm@1 is the latest 0.8 compatible version (needed to ensure modules are installed correctly) +# ensure coffee-script is installed (needed for cake commands) +# ensure dev dependencies are installed (handled via npm install) +# ensure test dependencies are installed (handled via cake install) +install: "npm install -g npm@1 && npm install coffee-script && npm install && ./node_modules/.bin/cake install" +# ensure our application is compiled before we run our tests before_script: "./node_modules/.bin/cake compile" script: "npm test" node_js: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6dc12e4..011ee84 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ @@ -9,9 +9,9 @@ https://github.com/bevry/base ## Resources -- [Coding Standards](http://bevry.me/bevry/coding-standards) -- [Documentation Guidelines](http://bevry.me/bevry/documentation-guidelines) -- [Support Guidelines](http://bevry.me/bevry/support-guidelines) +- [Coding Standards](http://learn.bevry.me/community/coding-standards) +- [Documentation Guidelines](http://learn.bevry.me/community/documentation-guidelines) +- [Support Guidelines](http://learn.bevry.me/community/support-guidelines) ## Development diff --git a/Cakefile b/Cakefile index 07c73ce..8a076ef 100644 --- a/Cakefile +++ b/Cakefile @@ -1,4 +1,4 @@ -# v1.3.15 May 16, 2014 +# v1.3.20 June 16, 2014 # https://github.com/bevry/base @@ -18,27 +18,29 @@ NPM = (if WINDOWS then process.execPath.replace('node.exe', 'npm.cm EXT = (if WINDOWS then '.cmd' else '') GIT = "git" -APP_PATH = process.cwd() +APP_PATH = process.cwd() PACKAGE_PATH = pathUtil.join(APP_PATH, "package.json") PACKAGE_DATA = require(PACKAGE_PATH) MODULES_PATH = pathUtil.join(APP_PATH, "node_modules") DOCPAD_PATH = pathUtil.join(MODULES_PATH, "docpad") -BIN_PATH = pathUtil.join(MODULES_PATH, ".bin") -CAKE = pathUtil.join(BIN_PATH, "cake" + EXT) -COFFEE = pathUtil.join(BIN_PATH, "coffee" + EXT) -PROJECTZ = pathUtil.join(BIN_PATH, "projectz" + EXT) -DOCCO = pathUtil.join(BIN_PATH, "docco" + EXT) -DOCPAD = pathUtil.join(BIN_PATH, "docpad" + EXT) +CAKE = pathUtil.join(MODULES_PATH, "coffee-script/bin/cake") +COFFEE = pathUtil.join(MODULES_PATH, "coffee-script/bin/coffee") +PROJECTZ = pathUtil.join(MODULES_PATH, "projectz/bin/projectz") +DOCCO = pathUtil.join(MODULES_PATH, "docco/bin/docco") +DOCPAD = pathUtil.join(MODULES_PATH, "docpad/bin/docpad") +BISCOTTO = pathUtil.join(MODULES_PATH, "biscotto/bin/biscotto") config = {} -config.TEST_PATH = "test" -config.DOCCO_SRC_PATH = null -config.DOCCO_OUT_PATH = "docs" -config.COFFEE_SRC_PATH = null -config.COFFEE_OUT_PATH = "out" -config.DOCPAD_SRC_PATH = null -config.DOCPAD_OUT_PATH = "out" +config.TEST_PATH = "test" +config.DOCCO_SRC_PATH = null +config.DOCCO_OUT_PATH = "docs" +config.BISCOTTO_SRC_PATH = null +config.BISCOTTO_OUT_PATH = "docs" +config.COFFEE_SRC_PATH = null +config.COFFEE_OUT_PATH = "out" +config.DOCPAD_SRC_PATH = null +config.DOCPAD_OUT_PATH = "out" for own key,value of (PACKAGE_DATA.cakeConfiguration or {}) config[key] = value @@ -133,11 +135,11 @@ actions = step2 = -> return step3() if !config.COFFEE_SRC_PATH or !fsUtil.existsSync(COFFEE) console.log('coffee compile') - spawn(COFFEE, ['-co', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) + spawn(NODE, [COFFEE, '-co', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) step3 = -> return step4() if !config.DOCPAD_SRC_PATH or !fsUtil.existsSync(DOCPAD) console.log('docpad generate') - spawn(DOCPAD, ['generate'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step4) + spawn(NODE, [DOCPAD, 'generate'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step4) step4 = next # Start @@ -154,12 +156,12 @@ actions = step2 = -> return step3() if !config.COFFEE_SRC_PATH or !fsUtil.existsSync(COFFEE) console.log('coffee watch') - spawn(COFFEE, ['-wco', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background + spawn(NODE, [COFFEE, '-wco', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background step3() # continue while coffee runs in background step3 = -> return step4() if !config.DOCPAD_SRC_PATH or !fsUtil.existsSync(DOCPAD) console.log('docpad run') - spawn(DOCPAD, ['run'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background + spawn(NODE, [DOCPAD, 'run'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background step4() # continue while docpad runs in background step4 = next @@ -193,12 +195,16 @@ actions = step2 = -> return step3() if !fsUtil.existsSync(PROJECTZ) console.log('projectz compile') - spawn(PROJECTZ, ['compile'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) + spawn(NODE, [PROJECTZ, 'compile'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) step3 = -> return step4() if !config.DOCCO_SRC_PATH or !fsUtil.existsSync(DOCCO) console.log('docco compile') - exec("#{DOCCO} -o #{config.DOCCO_OUT_PATH} #{config.DOCCO_SRC_PATH}", {stdio:'inherit', cwd:APP_PATH}, safe next, step4) + exec("#{NODE} #{DOCCO} -o #{config.DOCCO_OUT_PATH} #{config.DOCCO_SRC_PATH}", {stdio:'inherit', cwd:APP_PATH}, safe next, step4) step4 = -> + return step5() if !config.BISCOTTO_SRC_PATH or !fsUtil.existsSync(BISCOTTO) + console.log('biscotto compile') + exec("""#{BISCOTTO} --name #{PACKAGE_DATA.title or PACKAGE_DATA.name} --title "#{PACKAGE_DATA.title or PACKAGE_DATA.name} API Documentation" --readme README.md --output-dir #{config.BISCOTTO_OUT_PATH} #{config.BISCOTTO_SRC_PATH} - LICENSE.md HISTORY.md""", {stdio:'inherit', cwd:APP_PATH}, safe next, step5) + step5 = -> console.log('cake test') actions.test(opts, safe next, step5) step5 = next diff --git a/HISTORY.md b/HISTORY.md index ea715a3..1e16e9a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,7 @@ - v2.4.x - Updated dependencies - coffee-script 1.6.3 to 1.7.1 + - Added support for partials directory - v2.3.0 January 10, 2014 - Repackaged diff --git a/README.md b/README.md index 1e9f5c0..6d4ff2b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ plugins: getBlock: (type, additional...) -> additional.pop() # remove the hash object @getBlock(type).add(additional).toHTML() + partialsDir: './src/layouts/partials' partials: title: '