chore(build): s/tmp/temp

This commit is contained in:
Andrew Joslin
2014-05-22 10:17:50 -06:00
parent 979f7b5275
commit 7d8436f8da
13 changed files with 25 additions and 23 deletions

1
.gitignore vendored
View File

@@ -19,4 +19,5 @@ UserInterfaceState.xcuserstate
bower_components/
components/
tmp
temp
dist

View File

@@ -102,10 +102,10 @@ For most cases, you'll need AngularJS as well. This is bundled in `js/angular/`
### Documentation
* To test documentation, follow these steps:
1. Clone ionic-site to `./tmp/ionic-site` - this is where the `gulp docs` task builds to. `./tmp` is the folder that travis uses to do all of its tasks.
- `mkdir tmp && git clone git@github.com:driftyco/ionic-site tmp/ionic-site`
1. Clone ionic-site to `./temp/ionic-site` - this is where the `gulp docs` task builds to. `./temp` is the folder that travis uses to do all of its tasks.
- `mkdir temp && git clone git@github.com:driftyco/ionic-site temp/ionic-site`
2. Make jekyll rebuild whenever you change the site.
- `cd tmp/ionic-site && jekyll serve -w`
- `cd temp/ionic-site && jekyll serve -w`
3. Go back to project root and build the docs
- `gulp docs`
4. Open localhost:4000 and see your changes! Re-run `gulp docs` again whenever you change something, and jekyll will update the site.

View File

@@ -19,13 +19,13 @@ module.exports = function(config) {
config.set('basePath', __dirname);
config.set('source.projectPath', '.');
config.set('rendering.outputFolder', '../tmp/ionic-site');
config.set('rendering.outputFolder', '../temp/ionic-site');
var versionData = require('./generate-versions')(config);
config.set('versionData', versionData);
config.set('rendering.contentsFolder', path.join('docs', versionData.current.folder));
config.set('demos.outputFolder', path.join(__dirname, '../tmp/ionic-demo'));
config.set('demos.outputFolder', path.join(__dirname, '../temp/ionic-demo'));
config.set('processing.api-docs', {
outputPath: 'api/${docType}/${name}/index.md',

View File

@@ -14,6 +14,7 @@ module.exports = {
contentsFolder = config.get('rendering.contentsFolder');
},
process: function(docs, config, extraData) {
//Disable demos for now
if(1) return;
var demoTags = [
'javascript',

View File

@@ -27,7 +27,7 @@ angular.module(<@ if doc.demoData @>'<$ doc.demoData.module $>'
}, document.querySelector('.demo-footer'));
$scope.demoScratch = function(demo) {
var form = angular.element('<form method="POST" action="http://scratch.ionicsdk.com/embed">');
var form = angular.element('<form method="POST" action="http://scratch.ionicsdk.com/embed" target="_blank">');
var htmlInput = angular.element('<textarea type="text" name="html">')
.val(['<html ng-app="<$ doc.demoData.module $>">',

View File

@@ -257,18 +257,18 @@ gulp.task('docs-index', function() {
}
return gulp.src([
'tmp/ionic-site/docs/{components,guide,api,overview}/**/*.{md,html,markdown}',
'tmp/ionic-site/docs/index.html',
'tmp/ionic-site/getting-started/index.html',
'tmp/ionic-site/tutorials/**/*.{md,html,markdown}',
'tmp/ionic-site/_posts/**/*.{md,html,markdown}'
'temp/ionic-site/docs/{components,guide,api,overview}/**/*.{md,html,markdown}',
'temp/ionic-site/docs/index.html',
'temp/ionic-site/getting-started/index.html',
'temp/ionic-site/tutorials/**/*.{md,html,markdown}',
'temp/ionic-site/_posts/**/*.{md,html,markdown}'
])
.pipe(es.map(function(file, callback) {
//docs for gulp file objects: https://github.com/wearefractal/vinyl
var contents = file.contents.toString(); //was buffer
// Grab relative path from ionic-site root
var relpath = file.path.replace(/^.*?tmp\/ionic-site\//, '');
var relpath = file.path.replace(/^.*?temp\/ionic-site\//, '');
// Read out the yaml portion of the Jekyll file
var yamlStartIndex = contents.indexOf('---');
@@ -362,9 +362,9 @@ gulp.task('docs-index', function() {
})).on('end', function() {
// Write out as one json file
mkdirp.sync('tmp/ionic-site/data');
mkdirp.sync('temp/ionic-site/data');
fs.writeFileSync(
'tmp/ionic-site/data/index.json',
'temp/ionic-site/data/index.json',
JSON.stringify({'ref': ref, 'index': idx.toJSON()})
);
});

View File

@@ -9,7 +9,7 @@ ARG_DEFS=(
function init {
PROJECT_DIR=$SCRIPT_DIR/../..
TMP_DIR=$PROJECT_DIR/tmp
TMP_DIR=$PROJECT_DIR/temp
BUILD_DIR=$PROJECT_DIR/dist
APPBASE_DIR=$TMP_DIR/app-base

View File

@@ -12,7 +12,7 @@ ARG_DEFS=(
)
function init {
TMP_DIR=$SCRIPT_DIR/../../tmp
TMP_DIR=$SCRIPT_DIR/../../temp
BUILD_DIR=$SCRIPT_DIR/../../dist
PROJECT_DIR=$SCRIPT_DIR/../..

View File

@@ -13,7 +13,7 @@ function init {
PROJECT_DIR=$SCRIPT_DIR/../..
BUILD_DIR=$SCRIPT_DIR/../../dist
IONIC_CODE_DIR=$SCRIPT_DIR/../../tmp/ionic-code
IONIC_CODE_DIR=$SCRIPT_DIR/../../temp/ionic-code
rm -rf $IONIC_CODE_DIR
mkdir -p $IONIC_CODE_DIR
}

View File

@@ -8,7 +8,7 @@ ARG_DEFS=(
)
function init {
TMP_DIR=$SCRIPT_DIR/../../tmp
TMP_DIR=$SCRIPT_DIR/../../temp
BUILD_DIR=$SCRIPT_DIR/../../dist
SEED_DIR=$TMP_DIR/seed

View File

@@ -8,7 +8,7 @@ function init {
PROJECT_DIR=$SCRIPT_DIR/../..
BUILD_DIR=$SCRIPT_DIR/../../dist
IONIC_SITE_DIR=$SCRIPT_DIR/../../tmp/ionic-site
IONIC_SITE_DIR=$SCRIPT_DIR/../../temp/ionic-site
}
function clone {

View File

@@ -47,9 +47,9 @@ function run {
exit 0
fi
mkdir -p tmp
git show $TRAVIS_COMMIT~1:package.json > tmp/package.old.json
OLD_VERSION=$(readJsonProp "tmp/package.old.json" "version")
mkdir -p temp
git show $TRAVIS_COMMIT~1:package.json > temp/package.old.json
OLD_VERSION=$(readJsonProp "temp/package.old.json" "version")
VERSION=$(readJsonProp "package.json" "version")
CODENAME=$(readJsonProp "package.json" "codename")

View File

@@ -7,7 +7,7 @@ ARG_DEFS=(
)
function init {
TMP_DIR=$SCRIPT_DIR/../../tmp
TMP_DIR=$SCRIPT_DIR/../../temp
BUILD_DIR=$SCRIPT_DIR/../../dist
PROJECT_DIR=$SCRIPT_DIR/../..