• Как подключить SCSS во vue.config.js для Vue CLI?

    Madeas
    @Madeas Автор вопроса
    Михаил,

    module.exports = {
      css: {
        loaderOptions: {
          sass: {
            prependData: `
              @import "~@/assets/sass/base.scss";
              @import "~@/assets/sass/modules/aside.scss";
              @import "~@/assets/sass/modules/header.scss";
              `
          }
        }
      }
    };


    и базовый теперь такой:
    @import 'utils/reset';
    @import 'utils/mixins';
    //- и другие базовые стили
  • Как подключить SCSS во vue.config.js для Vue CLI?

    Madeas
    @Madeas Автор вопроса
    Михаил, уже исправляю. просто не нашел другого решения))
  • Как подключить SCSS во vue.config.js для Vue CLI?

    Madeas
    @Madeas Автор вопроса
    Михаил, значит их лучше добавить в конфиг вью, рядом с базовым? я просто не до конца улавливаю логику данного конфига. Если я правильно понимаю, файлы, указанные в нем, будут работать на все приложение и не будут дублироваться во все компоненты и файлы?
  • Как подключить SCSS во vue.config.js для Vue CLI?

    Madeas
    @Madeas Автор вопроса
    Михаил, да вроде все норм

    поковырялся немного, сделал так:

    vue.config.js
    module.exports = {
      css: {
        loaderOptions: {
          scss: {
            prependData: `@import "~@/assets/sass/base.scss";`
          }
        }
      }
    };


    base.scss
    @import 'utils/reset';
    @import 'utils/mixins';
    
    @import 'modules/aside';
    @import 'modules/header';


    Работает нормально, но теперь вопрос. Не будет ли такое использование проблемой в дальнейшем? Или лучше вынести все во vue.config.js?
  • Как подключить SCSS во vue.config.js для Vue CLI?

    Madeas
    @Madeas Автор вопроса
    Серьезно, профессор?
    А вы в каждый компонент заново добавляете переменные и токсины?
  • Как подключить SCSS во vue.config.js для Vue CLI?

    Madeas
    @Madeas Автор вопроса
    да, при создании проекта через vue cli выбрал их сразу.

    В процессе работы дополнил и теперь package выглядит так:

    "dependencies": {
        "axios": "^0.19.0",
        "core-js": "^3.4.3",
        "vue": "^2.6.10",
        "vue-router": "^3.1.3",
        "vuex": "^3.1.2"
      },
      "devDependencies": {
        "@vue/cli-plugin-babel": "^4.1.0",
        "@vue/cli-plugin-eslint": "^4.1.0",
        "@vue/cli-plugin-router": "^4.1.0",
        "@vue/cli-plugin-vuex": "^4.1.0",
        "@vue/cli-service": "^4.1.0",
        "@vue/eslint-config-prettier": "^5.0.0",
        "babel-eslint": "^10.0.3",
        "eslint": "^5.16.0",
        "eslint-plugin-prettier": "^3.1.1",
        "eslint-plugin-vue": "^5.0.0",
        "node-sass": "^4.12.0",
        "prettier": "^1.19.1",
        "pug": "^2.0.4",
        "pug-plain-loader": "^1.0.0",
        "sass-loader": "^8.0.0",
        "style-loader": "^1.0.1",
        "style-resources-loader": "^1.3.2",
        "vue-template-compiler": "^2.6.10"
      },
  • Как сделать кнопки на одном уровне?

    Рустам Байназаров,
    задача стоит в том, чтобы решить эту проблему именно с сеткой бутстрап
    вот в чем его проблема)
  • Можно ли закрыть таски для ubuntu/win10?

    Madeas
    @Madeas Автор вопроса
    Vyach Gor, да нода-то обновлена. Судя по всему, вполне возможно что линукс на работе давно пора обновить, или питон. В любом случае, придется просить айтишников))
  • Как перенести документ из word в html?

    можно просто сесть и спокойно перенести руками данные в готовую разметку
  • Можно ли закрыть таски для ubuntu/win10?

    Madeas
    @Madeas Автор вопроса
    log
    spoiler

    npm install node-sass gulp-sass --save-dev

    > node-sass@4.12.0 install ~/node_modules/node-sass
    > node scripts/install.js

    Cached binary found at ~/.npm/node-sass/4.12.0/linux-x64-64_binding.node

    > gifsicle@4.0.1 postinstall ~/node_modules/gifsicle
    > node lib/install.js

    ⚠ spawn ~/node_modules/gifsicle/vendor/gifsicle EACCES
    ⚠ gifsicle pre-build test failed
    ℹ compiling from source
    ✖ Error: Command failed: /bin/sh -c autoreconf -ivf
    /bin/sh: 1: autoreconf: not found

    at Promise.all.then.arr (~/node_modules/execa/index.js:231:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)

    > node-sass@4.12.0 postinstall ~/node_modules/node-sass
    > node scripts/build.js

    Binary found at ~/node_modules/node-sass/vendor/linux-x64-64/binding.node
    Testing binary
    Binary has a problem: Error: ~/node_modules/node-sass/vendor/linux-x64-64/binding.node: failed to map segment from shared object
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:805:18)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at module.exports (~/node_modules/node-sass/lib/binding.js:19:10)
    at Object. (~/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    Building the binary locally
    Building: /usr/local/bin/node ~/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
    gyp info it worked if it ends with ok
    gyp verb cli [ '/usr/local/bin/node',
    gyp verb cli '~/node_modules/node-gyp/bin/node-gyp.js',
    gyp verb cli 'rebuild',
    gyp verb cli '--verbose',
    gyp verb cli '--libsass_ext=',
    gyp verb cli '--libsass_cflags=',
    gyp verb cli '--libsass_ldflags=',
    gyp verb cli '--libsass_library=' ]
    gyp info using node-gyp@3.8.0
    gyp info using node@10.16.0 | linux | x64
    gyp verb command rebuild []
    gyp verb command clean []
    gyp verb clean removing "build" directory
    gyp verb command configure []
    gyp verb check python checking for Python executable "python2" in the PATH
    gyp verb `which` succeeded python2 /usr/bin/python2
    gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.12
    gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
    gyp verb get node dir no --target version specified, falling back to host node version: 10.16.0
    gyp verb command install [ '10.16.0' ]
    gyp verb install input version string "10.16.0"
    gyp verb install installing version: 10.16.0
    gyp verb install --ensure was passed, so won't reinstall if already installed
    gyp verb install version is already installed, need to check "installVersion"
    gyp verb got "installVersion" 9
    gyp verb needs "installVersion" 9
    gyp verb install version is good
    gyp verb get node dir target node version installed: 10.16.0
    gyp verb build dir attempting to create "build" dir: ~/node_modules/node-sass/build
    gyp verb build dir "build" dir needed to be created? ~/node_modules/node-sass/build
    gyp verb build/config.gypi creating config file
    gyp verb build/config.gypi writing out config file: ~/node_modules/node-sass/build/config.gypi
    gyp verb config.gypi checking for gypi file: ~/node_modules/node-sass/config.gypi
    gyp verb common.gypi checking for gypi file: ~/node_modules/node-sass/common.gypi
    gyp verb gyp gyp format was not specified; forcing "make"
    gyp info spawn /usr/bin/python2
    gyp info spawn args [ '~/node_modules/node-gyp/gyp/gyp_main.py',
    gyp info spawn args 'binding.gyp',
    gyp info spawn args '-f',
    gyp info spawn args 'make',
    gyp info spawn args '-I',
    gyp info spawn args '~/node_modules/node-sass/build/config.gypi',
    gyp info spawn args '-I',
    gyp info spawn args '~/node_modules/node-gyp/addon.gypi',
    gyp info spawn args '-I',
    gyp info spawn args '~/.node-gyp/10.16.0/include/node/common.gypi',
    gyp info spawn args '-Dlibrary=shared_library',
    gyp info spawn args '-Dvisibility=default',
    gyp info spawn args '-Dnode_root_dir=~/.node-gyp/10.16.0',
    gyp info spawn args '-Dnode_gyp_dir=~/node_modules/node-gyp',
    gyp info spawn args '-Dnode_lib_file=~/.node-gyp/10.16.0/<(target_arch)/node.lib',
    gyp info spawn args '-Dmodule_root_dir=~/node_modules/node-sass',
    gyp info spawn args '-Dnode_engine=v8',
    gyp info spawn args '--depth=.',
    gyp info spawn args '--no-parallel',
    gyp info spawn args '--generator-output',
    gyp info spawn args 'build',
    gyp info spawn args '-Goutput_dir=.' ]
    gyp verb command build []
    gyp verb build type Release
    gyp verb architecture x64
    gyp verb node dev dir ~/.node-gyp/10.16.0
    gyp verb `which` succeeded for `make` /usr/bin/make
    gyp info spawn make
    gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
    make: вход в каталог «~/node_modules/node-sass/build»
    g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.4"' -I~/.node-gyp/10.16.0/include/node -I~/.node-gyp/10.16.0/src -I~/.node-gyp/10.16.0/deps/openssl/config -I~/.node-gyp/10.16.0/deps/openssl/openssl/include -I~/.node-gyp/10.16.0/deps/uv/include -I~/.node-gyp/10.16.0/deps/zlib -I~/.node-gyp/10.16.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++1y -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
    make: g++: Команда не найдена
    src/libsass.target.mk:150: ошибка выполнения рецепта для цели «Release/obj.target/libsass/src/libsass/src/ast.o»
    make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Ошибка 127
    make: выход из каталога «~/node_modules/node-sass/build»
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack at ChildProcess.onExit (~/node_modules/node-gyp/lib/build.js:262:23)
    gyp ERR! stack at ChildProcess.emit (events.js:198:13)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
    gyp ERR! System Linux 4.4.0-78-generic
    gyp ERR! command "/usr/local/bin/node" "~/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
    gyp ERR! cwd ~/node_modules/node-sass
    gyp ERR! node -v v10.16.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    Build failed with error code: 1
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gifsicle@4.0.1 (node_modules/gifsicle):
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: gifsicle@4.0.1 postinstall: `node lib/install.js`
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-sass@4.12.0 postinstall script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! ~/.npm/_logs/2019-09-11T13_56_53_776Z-debug.log


    package.json
    "devDependencies": {
        "@babel/core": "^7.6.0",
        "@babel/preset-env": "^7.6.0",
        "gulp": "^4.0.2",
        "gulp-babel": "^8.0.0",
        "gulp-cached": "^1.1.1",
        "gulp-clean-css": "^4.2.0",
        "gulp-concat": "^2.6.1",
        "gulp-imagemin": "^6.1.0",
        "gulp-merge-media-queries": "^0.2.1",
        "gulp-newer": "^1.4.0",
        "gulp-pug": "^4.0.1",
        "gulp-rename": "^1.4.0",
        "gulp-sass": "^4.0.2",
        "gulp-sourcemaps": "^2.6.5",
        "gulp-uglify": "^3.0.2",
        "imagemin-mozjpeg": "^8.0.0",
        "imagemin-optipng": "^7.0.0",
        "imagemin-svgo": "^7.0.0",
        "imagemin-webp": "^5.1.0",
        "node-sass": "^4.12.0"
      },


    изначально я собирал на работе, дома это так... для комфорта. Ставлю всегда через npm i -D ...
  • Где можно найти подобный navbar в реализации html+css?

    можно руками, через чекбокс сделать переключение + анимация.
  • Что плохого в количестве коммитов чуть больше, чем за которое могла решиться задача на самом деле?

    придирки. я делаю сайты и вношу правки по сто раз, на след день делаю их снова, в поисках "лучшего решения". Не вешать же меня за это. Ну да, был бы профессиональнее, делал бы меньше, но пока вот так.
  • Как правильно вставить значение в шаблон?

    Madeas
    @Madeas Автор вопроса
    Михаил, что это значит?)

    просто сделал так
    "dash": "96 4",
    <circle cx="21" cy="21" r="15.91549430918954" stroke="#49a12f" :stroke-dasharray="p.dash" stroke-dashoffset="25"></circle>
  • Как правильно вставить значение в шаблон?

    Madeas
    @Madeas Автор вопроса
    сделал проще, поместил в "dash": "96 4", два значения и все норм работает. Спасибо за помощь.
  • Как правильно вставить значение в шаблон?

    Madeas
    @Madeas Автор вопроса
    Михаил, сейчас пробую переписать в .vue файл, но я пока не умею его подключать ( буду позже читать доки, как доделаю