wtho / bulma-css-vars

Bulma with CSS Variables
https://wtho.github.io/bulma-css-vars
MIT License
60 stars 13 forks source link

Can't setup #167

Open DomasM opened 3 years ago

DomasM commented 3 years ago

I am stuck at --init step with this output

D:\c#\c#projects\test2>node ./node_modules/.bin/bulma-css-vars --init
D:\c#\c#projects\test2\node_modules\.bin\bulma-css-vars:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
←[90m    at wrapSafe (internal/modules/cjs/loader.js:979:16)←[39m
←[90m    at Module._compile (internal/modules/cjs/loader.js:1027:27)←[39m
←[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)←[39m
←[90m    at Module.load (internal/modules/cjs/loader.js:928:32)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:769:14)←[39m
←[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m    at internal/main/run_main_module.js:17:47←[39m

package.json

{
  "name": "topas4analyticsweb",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "css-build": "sass src/main.csss src/assets/css/main.css",
    "css-watch": "npm run css-build -- --watch",
    "start": "npm run css-watch"
  },
  "dependencies": {
    "@adapttive/vue-markdown": "^4.0.1",
    "@diracleo/vue-enlargeable-image": "0.0.7",
    "buefy": "^0.9.8",
    "bulma": "^0.9.3",
    "bulma-css-vars": "^0.6.1",
    "core-js": "^3.6.5",
    "lodash": "^4.17.21",
    "markdown-it-vue": "^1.1.6",
    "plotly.js": "^2.2.1",
    "vue": "^2.6.11",
    "vue-clipboard2": "^0.3.1",
    "vue-luxon": "^0.10.0",
    "vue-router": "^3.2.0",
    "vue-select": "^3.11.2"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-router": "^4.5.13",
    "@vue/cli-service": "~4.5.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^6.2.2",
    "sass": "^1.35.2",
    "vue-template-compiler": "^2.6.11"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/strongly-recommended",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {
      "no-mixed-spaces-and-tabs": "off",
      "vue/require-v-for-key": "off",
      "no-unused-vars": [
        "error",
        {
          "args": "none"
        }
      ]
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}
wtho commented 3 years ago

Can you post the contents of D:\c#\c#projects\test2\node_modules\.bin\bulma-css-vars? Seems like there's an issue with the bin file generated by node on windows.

Which version of node are you using?

DomasM commented 3 years ago

Node.js v14.15.0.

bulma-css-vars

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  "$basedir/node"  "$basedir/../bulma-css-vars/bin/bulma-css-vars.js" "$@"
  ret=$?
else 
  node  "$basedir/../bulma-css-vars/bin/bulma-css-vars.js" "$@"
  ret=$?
fi
exit $ret
DomasM commented 3 years ago

any updates?

wtho commented 3 years ago

Try npx bulma-css-vars --init. Make sure you have sass installed in your project.

I am not sure if you can call bulma-css-vars to regenerate the scss though using the binary. I am interested in your feedback.