Commit c65b922a authored by Nikolay Gromov's avatar Nikolay Gromov

Сменил способ сборки и отправки в gh-pages

parent 0ec927b1
......@@ -115,6 +115,5 @@ src/ # Исходные файлы
```bash
npm start build # собрать проект без карт кода
npm start deploy # отправить в gh-pages
npm run deploy # собрать проект без карт кода и отправить на gh-pages
```
......@@ -3,6 +3,7 @@
// Получение настроек папок из package.json
const pjson = require('./package.json');
const dirs = pjson.config.directories;
const ghPagesUrl = pjson.config.ghPages;
// Зависимости проекта
const gulp = require('gulp');
......@@ -256,6 +257,7 @@ gulp.task('serve', gulp.series('build', function() {
// Отправка в GH pages (ветку gh-pages репозитория)
gulp.task('deploy', function() {
console.log('---------- Публикация ./build/ на GH pages');
console.log('---------- '+ ghPagesUrl);
return gulp.src('./build/**/*')
.pipe(ghPages());
});
......
......@@ -5,7 +5,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "./node_modules/.bin/gulp",
"deploy": "cross-env NODE_ENV=production gulp build && gulp deploy"
"deploy": "cross-env NODE_ENV=production ./node_modules/.bin/gulp build && cross-env ./node_modules/.bin/gulp deploy"
},
"author": "Nikolay Gromov",
"license": "MIT",
......@@ -42,6 +42,7 @@
"mkdirp": "^0.5.1"
},
"config": {
"ghPages": "http://nicothin.github.io/NTH-start-project/blocks_library.html",
"directories": {
"source": "./src",
"build": "./build"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment