diff --git a/README.md b/README.md index 7e3f720..914a9a4 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ To set up an HTML5 Boilerplate project that does not use AMD/RequireJS, but does use documentcloud repos of Backbone and Underscore (the Boilerplate already has jQuery): - > volo create html5fast h5bp/html5-boilerplate (pulls down latest tag of that repo) + > volo create html5fast html5-boilerplate (pulls down latest tag of that repo) > cd html5fast > volo add underscore (uses documentcloud/underscore as repo) > volo add backbone (uses documentcloud/backbone as repo) diff --git a/dist/volo b/dist/volo index f363d61..44bc424 100755 --- a/dist/volo +++ b/dist/volo @@ -1,12 +1,12 @@ #!/usr/bin/env node /** - * @license volo 0.0.9 Copyright (c) 2012, The Dojo Foundation All Rights Reserved. + * @license volo 0.1.0 Copyright (c) 2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/volojs/volo for details */ -var voloVersion = '0.0.9'; +var voloVersion = '0.1.0'; //Wipe out the exports object since some node-converted modules look for it. var exports = undefined; @@ -2376,6 +2376,9 @@ define('volo/config',['require','fs','path','./lang','./baseUrl'],function (requ "underscore": "amdjs/underscore", "backbone": "amdjs/backbone" } + }, + "typeOverrides": { + "dojo/dijit": "directory" } }, @@ -8051,7 +8054,7 @@ define('volo/resolve/github',['require','path','../config','../archive','../gith var archive; if (results && results.length) { archive = results[0].archive; - console.log('Using search result "' + archive + + console.log('Using github repo "' + archive + '" for "' + archiveName + '"...'); return archive; } else { @@ -11615,16 +11618,35 @@ define('add',['require','exports','module','fs','path','q','volo/config','volo/a completeMessage = '', ext = '', info, sourceName, targetName, - listing, defaultName, mainFile, mainContents, deps; + listing, defaultName, mainFile, mainContents, + deps, pkgType, overrideTypeName; if (dirName) { info = packageJson(dirName); - //If a main setting, read the main file. If it - //calls define() and any of the dependencies - //are relative, then keep the whole directory. - mainFile = info.data && info.data.main; - if (mainFile) { + if (info.data) { + mainFile = info.data && info.data.main; + pkgType = info.data.volo && info.data.volo.type; + } + + if (!pkgType && archiveInfo.scheme === 'github') { + //Check for an override, just pull off the + //owner/repo from the archive ID + overrideTypeName = /github:([^\/]+\/[^\/]+)/.exec(archiveInfo.id)[1]; + pkgType = (config.github && + config.github.typeOverrides && + config.github.typeOverrides[overrideTypeName]) || + null; + } + + if (pkgType === 'directory') { + //The whole directory should be kept, + //not an individual source file. + sourceName = null; + } else if (mainFile) { + //Read the main file. If it + //calls define() and any of the dependencies + //are relative, then keep the whole directory. mainFile += jsRegExp.test(mainFile) ? '' : '.js'; mainFile = path.join(dirName, mainFile); mainContents = fs.readFileSync(mainFile, 'utf8'); diff --git a/docs/releaseNotes.md b/docs/releaseNotes.md index 33141c5..dc71915 100644 --- a/docs/releaseNotes.md +++ b/docs/releaseNotes.md @@ -3,6 +3,16 @@ Some release notes for a few recent versions of volo. Will be trimmed every so often, but use git history to find details on other releases. +## 0.1.0 + +* volo.type support for explicitly stating a directory should be kept instead +of extracting a single JS file from an archive. + +## 0.0.9 + +* added `volo search`, now shortnames like 'jquery' work fo `volo add`. +* support for volo.url and volo.archive in package.json. + ## 0.0.8 * amdify depends allows settings a local name for a dependency: depends=jquery=$ diff --git a/tools/wrap.start b/tools/wrap.start index ea9c0ab..551b2a2 100644 --- a/tools/wrap.start +++ b/tools/wrap.start @@ -1,12 +1,12 @@ #!/usr/bin/env node /** - * @license volo 0.0.9 Copyright (c) 2012, The Dojo Foundation All Rights Reserved. + * @license volo 0.1.0 Copyright (c) 2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/volojs/volo for details */ -var voloVersion = '0.0.9'; +var voloVersion = '0.1.0'; //Wipe out the exports object since some node-converted modules look for it. var exports = undefined;