Commit c65b922a authored by Nikolay Gromov's avatar Nikolay Gromov

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

parent 0ec927b1
...@@ -115,6 +115,5 @@ src/ # Исходные файлы ...@@ -115,6 +115,5 @@ src/ # Исходные файлы
```bash ```bash
npm start build # собрать проект без карт кода npm run deploy # собрать проект без карт кода и отправить на gh-pages
npm start deploy # отправить в gh-pages
``` ```
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// Получение настроек папок из package.json // Получение настроек папок из package.json
const pjson = require('./package.json'); const pjson = require('./package.json');
const dirs = pjson.config.directories; const dirs = pjson.config.directories;
const ghPagesUrl = pjson.config.ghPages;
// Зависимости проекта // Зависимости проекта
const gulp = require('gulp'); const gulp = require('gulp');
...@@ -256,6 +257,7 @@ gulp.task('serve', gulp.series('build', function() { ...@@ -256,6 +257,7 @@ gulp.task('serve', gulp.series('build', function() {
// Отправка в GH pages (ветку gh-pages репозитория) // Отправка в GH pages (ветку gh-pages репозитория)
gulp.task('deploy', function() { gulp.task('deploy', function() {
console.log('---------- Публикация ./build/ на GH pages'); console.log('---------- Публикация ./build/ на GH pages');
console.log('---------- '+ ghPagesUrl);
return gulp.src('./build/**/*') return gulp.src('./build/**/*')
.pipe(ghPages()); .pipe(ghPages());
}); });
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"start": "./node_modules/.bin/gulp", "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", "author": "Nikolay Gromov",
"license": "MIT", "license": "MIT",
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
"mkdirp": "^0.5.1" "mkdirp": "^0.5.1"
}, },
"config": { "config": {
"ghPages": "http://nicothin.github.io/NTH-start-project/blocks_library.html",
"directories": { "directories": {
"source": "./src", "source": "./src",
"build": "./build" "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