Description
Bug Report 🐛
When trying to run dingus locally on Windows, the following error is received.
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
Steps to Reproduce
- Fork/Clone the repo in windows.
- Run npm install.
3 .Run cd packages/dingus in a new terminal - Run npm install in the same new terminal
- 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.