Skip to content

Error while running dingus locally in Windows #375

Open
@nishihere19

Description

@nishihere19

Bug Report 🐛

When trying to run dingus locally on Windows, the following error is received.
package json - Projects - Visual Studio Code 02-04-2021 14_27_16 (2)

Expected Behavior

The command must be executed and dingus should run locally on Windows.

Current Behavior

The path is not recognized properly and it throws an error as shown above.

Possible Solution

sass/node-sass#317 (comment)

Steps to Reproduce

  1. Fork/Clone the repo in windows.
  2. Run npm install.
    3 .Run cd packages/dingus in a new terminal
  3. Run npm install in the same new terminal
  4. Run npm run dingus in the first terminal.

Context (Environment)

Desktop

  • OS: Windows 10
  • Browser: Chrome
  • Version: 89.0.4389.114 (Official Build) (64-bit)

Detailed Description

Separate run command, for e.g. npm run dingus: win for windows in package.json of markdown-transform.
A separate file consisting of a list of commands to be executed for demo setup as in build_dingus.js

Possible Implementation

A separate file consisting of commands for windows as given below.

#!/usr/bin/env node

'use strict';

/* eslint-env es6 */

const shell = require('shelljs');

shell.rm('-rf', 'demo');
shell.mkdir('demo');

var path = require('path');
var demo = path.resolve('./demo');

var demodata = path.resolve('./scripts/demodata.js');

var sample=path.resolve('./lib/sample.json');
shell.exec(demodata+' > '+sample);

var pug = path.resolve('./node_modules/pug-cli/index.js');
var index=path.resolve('./lib/index.pug');
shell.exec(pug+" "+index+' --pretty
--obj'+sample+'
--out'+demo);

var stylus=path.resolve('./node_modules/stylus/bin/stylus');
var index_styl= path.resolve('./lib/index.styl');

shell.exec('node '+stylus+' -u autoprefixer-stylus
< '+index_styl+' \

./demo/index.css');

var templateMarkCSS_lib=path.resolve('./lib/templatemark.css');
var templateMarkCSS_demo=path.resolve('./demo/templatemark.css');
shell.cp(templateMarkCSS_lib, templateMarkCSS_demo);

shell.rm('-rf', sample);
index=path.resolve('./node_modules/browserify/bin/cmd.js');
var index_demo=path.resolve('./demo/index.js');
shell.exec(index+' lib/index.js'+' \

'+ index_demo);

The file with the above code is running without throwing any errors, yet index.html is not generated in the demo folder like it does in Linux.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions