From fb1c5bb60dcfe2e3c1c37891aefc12ed079c9f9f Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Tue, 3 Jul 2018 11:51:00 -0400 Subject: [PATCH] Setup ignore files --- .gitignore | 15 ++++++++++----- .npmignore | 9 +++++++++ .travis.yml | 4 +++- gulpfile.js | 11 ++++------- package.json | 1 + 5 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 .npmignore diff --git a/.gitignore b/.gitignore index 25503310d..5d430248c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ -.DS_Store -.idea -.sass-cache -dist/ -node_modules/ \ No newline at end of file +/.idea/ +/dist/ +/node_modules/ + +/.DS_Store +/.sass-cache +/docs/ocean.css +/index.html +/npm-debug.log* +/yarn-error.log \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 000000000..f7768eb2a --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +.idea/ +docs/ +tests/ + +.eslintrc.js +.gitignore +.travis.yml +index.html +yarn.lock diff --git a/.travis.yml b/.travis.yml index ebf7fba77..240aa16e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,8 +45,10 @@ jobs: fi - stage: gh-pages release script: - - yarn build + - yarn docs before_deploy: + - git add -f index.html + - git add -f --all docs/ - git add -f --all dist/ deploy: provider: pages diff --git a/gulpfile.js b/gulpfile.js index c92e22e74..31ea6b29e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -73,10 +73,8 @@ gulp.task('markdown:docs', () => { } }) ) - .pipe(rename(function(path) { - path.extname = '.html'; - })) - .pipe(gulp.dest('./docs/')); + .pipe(rename('index.html')) + .pipe(gulp.dest('./')); gulp.src('./node_modules/highlight.js/styles/ocean.css') .pipe(gulp.dest('./docs')); @@ -89,8 +87,6 @@ gulp.task('css:docs', function() { .pipe(gulp.dest('./docs/welcome/css')); }); -gulp.task('docs', ['css:docs', 'markdown:docs']); - // Make a copy of popper available to those not using bundling gulp.task('copy-popper', function() { gulp.src('./node_modules/popper.js/dist/umd/popper.js') @@ -129,6 +125,7 @@ gulp.task('watch', ['js', 'css', 'eager'], function() { // Defaults -gulp.task('build', ['js', 'css', 'eager', 'copy-popper', 'docs']); +gulp.task('build', ['js', 'css', 'eager', 'copy-popper']); +gulp.task('docs', ['build', 'css:docs', 'markdown:docs']); gulp.task('default', ['build']); diff --git a/package.json b/package.json index 4243e4a3a..b44e844ef 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ ], "scripts": { "build": "gulp build", + "docs": "gulp docs", "lint": "eslint ./src/js/shepherd.js" }, "homepage": "http://shipshapecode.github.io/shepherd/docs/welcome/",