Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dingus): setup added for windows for running dingus locally #376

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38,792 changes: 19,512 additions & 19,280 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"jsdoc-sphinx": "0.0.6",
"lerna": "3.20.2",
"license-check": "1.1.5",
"license-check-and-add": "2.3.6",
"licensecheck": "1.3.0",
"semver": "6.2.0",
"sleep-promise": "8.0.1",
"source-map-support": "0.5.12",
"licensecheck": "1.3.0",
"license-check-and-add": "2.3.6"
"source-map-support": "0.5.12"
},
"engines": {
"node": ">=8",
Expand All @@ -28,7 +28,7 @@
"scripts": {
"dingus": "lerna exec --scope dingus -- npm run dingus",
"build": "lerna run build",
"postinstall": "npm run models:get && lerna bootstrap",
"postinstall": "npm run models:get && lerna bootstrap && cd packages/dingus && npm install",
"models:get": "node ./scripts/external/getExternalModels.js",
"models:clean": "node ./scripts/external/cleanExternalModels.js",
"coverage": "istanbul-combine -d coverage -r lcov packages/markdown-it-cicero/coverage/*.json packages/markdown-it-template/coverage/*.json packages/markdown-common/coverage/*.json packages/markdown-cicero/coverage/*.json packages/markdown-template/coverage/*.json packages/markdown-slate/coverage/*.json packages/markdown-html/coverage/*.json packages/markdown-pdf/coverage/*.json packages/markdown-docx/coverage/*.json packages/markdown-transform/coverage/*.json packages/markdown-cli/coverage/*.json && cat ./coverage/lcov.info",
Expand Down Expand Up @@ -126,5 +126,8 @@
}
}
},
"dependencies": {}
"dependencies": {
"moment-mini": "^2.24.0",
"winston": "^3.3.3"
}
}
2 changes: 1 addition & 1 deletion packages/dingus/lib/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ html
pre.hljs.result-debug.full-height
code.result-debug-content.full-height
pre.hljs.result-ast.full-height
code.result-ast-content.full-height
code.result-ast-content.full-height
4 changes: 2 additions & 2 deletions packages/dingus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"license": "Apache-2.0",
"scripts": {
"dingus": "node scripts/build_dingus.js"
"dingus": "node ./scripts/build_dingus.js"
},
"files": [],
"devDependencies": {
Expand All @@ -31,7 +31,7 @@
"ndoc": "^5.0.0",
"pug-cli": "^1.0.0-alpha6",
"shelljs": "^0.8.4",
"stylus": "^0.54.5",
"stylus": "^0.54.8",
"terser": "^4.1.2"
},
"mocha": {
Expand Down
32 changes: 21 additions & 11 deletions packages/dingus/scripts/build_dingus.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@ const shell = require('shelljs');
shell.rm('-rf', 'demo');
shell.mkdir('demo');

shell.exec('scripts/demodata.js > lib/sample.json');
var path = require('path');
var demo = path.resolve('./demo');

shell.exec('node_modules/.bin/pug lib/index.pug --pretty \
--obj lib/sample.json \
--out demo');
var demodata = path.resolve('./scripts/demodata.js');

shell.exec('node_modules/.bin/stylus -u autoprefixer-stylus \
< lib/index.styl \
> demo/index.css');
shell.exec(`node ${demodata} > lib/sample.json`);
var pug = path.resolve('./node_modules/pug-cli/index.js');
var index=path.resolve('./lib/index.pug');
shell.exec(`node ${pug} lib/index.pug --obj lib/sample.json --out ${demo}`);

shell.cp('lib/templatemark.css', 'demo/templatemark.css');
var stylus=path.resolve('./node_modules/stylus/bin/stylus');
var index_styl= path.resolve('./lib/index.styl');

shell.rm('-rf', 'lib/sample.json');
shell.exec(`node ${stylus} -u autoprefixer-stylus \
< ${index_styl} \
> ./demo/index.css`);

shell.exec('node_modules/.bin/browserify lib/index.js \
> demo/index.js');
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', "lib/sample.json");
index=path.resolve('./node_modules/browserify/bin/cmd.js');

shell.exec(`${index} lib/index.js \
> demo/index.js --standalone demo/index.html`);
Loading