Giter VIP home page Giter VIP logo

mojs.github.io's Introduction

mojs.github.io – deploy

Website for tutorials and documentation.

mo · js

Get started

  • Run npm i to install all dependencies
  • Run npm run dev to run the project locally at http://localhost:8080, your browser will open the URL automatically

Deploy

  • Run npm run build
  • Try the build locally using npx serve docs/.vuepress/dist
  • Automatic deployment through Github Actions on the main branch

Tips for docs writers

If you need very special demo that doesn't work with the <MojsCode> or the MojsInteractive components, create a new one and add it to the "components" folder. Make sure the name doesn't contain a number, VuePress doesn't like that.

Known bugs

  • If you get an Unknown custom element or any other weird errors, try restarting VuePress by stopping the process in your terminal, then run npm run dev again to clear the VuePress cache. It's probably due to some JS error in a custom component that you used to wrote.

  • If you get an Errors compiling template: tag <p> has no matching end tag. error, make sure you have a double line break before any HTML comments (<!--), like this:

My code

<!-- Some html comment -->

Conversion guide

Guide to convert jsx pages from the old mojs website to markdown.

Use find and replace in the file:

  • <UniteLink link="(.+?)">(.+?)</UniteLink> replace with [$2]($1)
  • <Cite> replace with > (make sure to remove the newline too)
  • </Cite> replace with ``
  • <span className="highlight">(.+?)</span> replace with "$1"
  • <div className="post__header">(.+?)</div> replace with # $1
  • <ORXLine className="post__orx-line" /> replace with <hr />
  • https://github.com/legomushroom/mojs/blob/master/api/ replace with /api/
  • <Pen pen="(.+?)" height="(.+?)" /> and <Pen pen="(.+?)" height="(.+?)"></Pen> replace with
<Codepen
  title="$1"
  pen="$1"
  user="sol0mka"
  height="$2"
/>
[Link to pen](https://codepen.io/sol0mka/pen/$1)
  • <Gif className="gif--50-width" src="(.+?)" /> replace with <img src="/assets$1" alt="Example gif" />
  • <CodeSample pen="(.+?)"> replace with // pen $1 \n```js
  • </CodeSample> replace with "```"
  • <Pen (.+?)" height="500</Pen> replace with <pre><code>$1</code></pre> code
  • <Pen (.+?)</Pen> replace with <pre><code>$1</code></pre>

Convert to markdown

Happy coding with mojs 🎉

mojs.github.io's People

Contributors

dependabot[bot] avatar sandstedt avatar xavierfoucrier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mojs.github.io's Issues

Cleanup codepens

The codepens often include the source of mojs which should not be the case: all pens need to refer to the minified version of mojs from jsdelivr. In additon, some codepens in the documentation are not properly working or sometimes broken (404).

Missing comma

var burst = new Burst({
    radius:   { 15: 50 }
    children: {
      fill:   [ 'deeppink', 'cyan', 'orange' ],
  }
});

And it should be mojs.Burst

The component MojsInteractive is broken

Get's this error while using the MojsInteractive Vue component:

[Vue warn]: Failed to resolve async component: function () {
  return Promise.all(/*! import() */[__webpack_require__.e(54), __webpack_require__.e(6)]).then(__webpack_require__.bind(null, /*! ./docs/.vuepress/components/MojsInteractive */ "./docs/.vuepress/components/MojsInteractive.vue"));
}
Reason: ReferenceError: global is not defined

Probably related to this issue in VuePress or this issue in Vue Prism Editor

Navbar not working as expected on mobile device

The navbar is not working as expected on mobile: it is behind the content and can't be reached.
When scrolling down, there's a gap that appear at the bottom.

I'm currently fixing the issue and will push a MR in a few minutes

Screen Shot 2022-01-22 at 06 51 37

Maybe example with react hooks

Was somebody able to make this thing work with react and functional components? Would be great if somebody could share some ideas.

React.js examples

Would it be possible if you add examples with React.js?

onClick() animations, page fade-in, etc.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.