You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MarkBind Version:
v3.1.1 What did you do? Please include the actual source code causing the issue.
I think it is pretty complicated for someone new with MarkBind to do a simple task such as ignoring files from node_modules. This is a common scenario when starting a js project and adding MarkBind to it. I took some time myself in order to figure out how to do it and initially thought that it was bug 😢
A typical project initialization process might look like this:
Start a new js project npm init
Install the latest version of markbind-cli npm i markbind-cli
Add in the package.json's script that "build": "markbind build", "init": "markbind init"
initialize a markbind project npm run init
try building the project by npm run build
will copy and build all the files in node_modules
not what is expected
read the docs to discover the ignore attribute
try adding "node_modules/*" in site.json's ignore attribute
try building the project by npm run build
doesn't quite work, still tries to build 500 plus pages, and ended with an error
possibly due to the glob pattern of "**/*.+(md|mbd)"
read the docs again to figure out that there's a globExcludes that works with glob (I initially thought that it is defined in a separate object and that doesn't work)
try adding "node_modules/*" in a globExcludes:
Note that this doesn't work, but it's the first thing I tried:
What did you expect to happen?
I expect the common task to be simple.
What actually happened? Please include the actual, raw output.
Currently, it requires a new user to understand a few attributes such as 'ignore', 'glob', 'globExcludes', 'pagesExclude' just to get started.
This could be due to the fact that we only mention how to globally install markbind-cli in our user guide. While that works, it may not work well for existing projects or those that already have the setup of a package.json with node_modules. My proposal is as follows:
Tell us about your environment
Windows 10
v3.1.1
What did you do? Please include the actual source code causing the issue.
I think it is pretty complicated for someone new with MarkBind to do a simple task such as ignoring files from
node_modules
. This is a common scenario when starting a js project and adding MarkBind to it. I took some time myself in order to figure out how to do it and initially thought that it was bug 😢A typical project initialization process might look like this:
npm init
npm i markbind-cli
package.json
's script that"build": "markbind build"
,"init": "markbind init"
npm run init
npm run build
ignore
attributesite.json
'signore
attributenpm run build
"**/*.+(md|mbd)"
Note that this doesn't work, but it's the first thing I tried:
This works
What did you expect to happen?
I expect the common task to be simple.
What actually happened? Please include the actual, raw output.
Currently, it requires a new user to understand a few attributes such as 'ignore', 'glob', 'globExcludes', 'pagesExclude' just to get started.
This could be due to the fact that we only mention how to globally install markbind-cli in our user guide. While that works, it may not work well for existing projects or those that already have the setup of a package.json with node_modules. My proposal is as follows:
npm i markbind-cli@3.1.1
. Related: Add examples of usingnpx
to setup MarkBind sites in the user guide #1772site.json
, ignorenode_modules/*
and also set"pagesExclude": ["node_modules/*"]
markbind init
#1782The text was updated successfully, but these errors were encountered: