docs: clean up to fit into monorepo

This commit is contained in:
Chris Breiding
2017-05-15 16:17:57 -04:00
parent 5619eae622
commit 8ee8db503f
4 changed files with 20 additions and 31 deletions
+15 -17
View File
@@ -1,53 +1,51 @@
var gulp = require('gulp')
var RevAll = require('gulp-rev-all')
var clean = require('gulp-clean')
var debug = require('gulp-debug')
var runSequence = require('run-sequence')
const gulp = require('gulp')
const RevAll = require('gulp-rev-all')
const clean = require('gulp-clean')
const runSequence = require('run-sequence')
var revisionOpts = {
const revisionOpts = {
dontGlobal: ['.ico', 'sitemap.xml', 'logo.png'],
dontRenameFile: ['.html', 'CNAME'],
dontUpdateReference: ['.html'],
dontSearchFile: ['.js'],
debug: true
debug: true,
}
function remove(folder) {
function remove (folder) {
return gulp
.src(folder)
.pipe(clean())
}
gulp.task('revision', function () {
gulp.task('revision', () => {
return gulp
.src('public/**')
.pipe(RevAll.revision(revisionOpts))
.pipe(gulp.dest('tmp'))
})
gulp.task('copyTmpToPublic', function(){
gulp.task('copyTmpToPublic', () => {
return gulp
.src('tmp/**')
.pipe(gulp.dest('public'))
})
gulp.task('clean:js', function(){
gulp.task('clean:js', () => {
return remove('public/js/!(application).js')
})
gulp.task('clean:tmp', function(){
gulp.task('clean:tmp', () => {
return remove('tmp')
})
gulp.task('clean:public', function(){
gulp.task('clean:public', () => {
return remove('public')
})
gulp.task('cname', function(){
gulp.src('CNAME')
.pipe(gulp.dest('public'))
gulp.task('cname', () => {
return gulp.src('CNAME').pipe(gulp.dest('public'))
})
gulp.task('prep', function (cb) {
gulp.task('prep', (cb) => {
runSequence('clean:js', 'revision', 'clean:public', 'copyTmpToPublic', 'clean:tmp', 'cname', cb)
})
+4 -6
View File
@@ -2,20 +2,18 @@
"name": "cypress-documentation",
"version": "1.0.0",
"description": "",
"main": "index.js",
"hexo": {
"version": "3.3.1"
},
"scripts": {
"clean": "hexo clean",
"clean-deps": "rm -rf node_modules",
"clean-all": "npm run clean && npm run clean-deps",
"convert": "node ./cy_scripts/convert.js",
"deploy": "npm run build && hexo deploy",
"prep": "gulp prep",
"build": "hexo clean && hexo generate && npm run prep",
"start": "hexo server --port 2222"
"build-prod": "hexo clean && hexo generate && gulp prep",
"watch-dev": "hexo server --port 2222"
},
"author": "Cypress.io",
"license": "ISC",
"devDependencies": {
"colors": "^1.1.2",
"fs-extra": "^3.0.1",
+1
View File
@@ -8,6 +8,7 @@
"scripts": {
"install-app": "node cli.js --exec install",
"postinstall": "npm run all install && npm run all build-dev",
"deploy:docs": "npm run all deploy -- --package docs",
"start": "node start.js",
"watch-dev": "npm run all watch-dev",
"test": "mocha --watch",
-8
View File
@@ -1,8 +0,0 @@
{
"commitMessage": "release %s",
"tagAnnotation": "release %s",
"github": {
"release": false,
"releaseName": "release %s"
}
}