Git Product home page Git Product logo

dojo.io's Introduction

dojo.io

Build Status

This repository is the source of the dojo.io website, including the documentation, tutorials, and the blog.

Published to GitHub Pages and Dojo.io.

Quick Start to run the Dojo.io website locally

  1. npm install
  2. npm run build
  3. npm run serve
  4. open http://localhost:8888

Development

To have hexo and the docviewer rebuild when files change:

  1. npm run watch

Adding Content

Writing a Blog

Blogs are built using hexo and are located in site/source/_posts

Adding a static page

Static pages are built from markdown located in site/source. Please see site/source/tutorials for examples of static content.

Writing a Tutorial

Tutorials are located in site/source/tutorials and are similar to static pages. They use the tutorial layout (layout: tutorial) and have code content provided in the demo subdirectory that is archived during the tutorials build process (grunt tutorials).

If the finished directory of the tutorial should be built and tested as part of the CI build, it needs to be added to the list of TUTORIAL values in .travis.yml

API Documentation

API documentation is generated in each package using the intern-dev-api from @theintern/dev. A viewer application in this site loads API information from the package repos and renders it live.

Deployment

This site is built for continuous deployment via Travis-ci. This requires Travis to have write access to this repository so it can automatically deploy to the gh-pages branch.

On a Master Branch Commit:

  1. A change is checked in to the master branch
  2. Travis decrypts the deploy_key.enc file to deploy_key
  3. Travis begins a build by running grunt
  4. The build syncs the origin's gh-pages branch to a temporary directory
  5. Hexo builds against the gh-pages branch
  6. Tutorial files are packaged and added
  7. On master, travis runs grunt publish and pushes changes to gh-pages

On a Non-Master Branch Commit:

The same steps as above are followed except Travis does not decrypt the deploy_key and does not attempt to publish any changes. Automated scripts should not take any action requiring authentication to git or GitHub because credentials will not exist.

Automated Deploy to Production

Travis automatically builds and deploys the master branch to gh-pages on each push.

NOTE: pushing a commit with [skip ci] will disable the Travis build and prevent the site from updating. A maintainer can instruct Travis to manually build latest.

dojo.io's People

Contributors

agubler avatar bitpshr avatar dannyhellbane avatar dasa avatar devpaul avatar dylans avatar edhager avatar gavinr avatar itorrey avatar jacobroufa avatar jameslmilner avatar jason0x43 avatar jcfranco avatar kitsonk avatar maier49 avatar matt-gadd avatar nicknisi avatar pottedmeat avatar rishson avatar rorticus avatar samends avatar schontz avatar scott-jensen avatar sitepentorreyrice avatar smhigley avatar stdavis avatar steveoh avatar tomdye avatar umaar avatar vansimke avatar

Stargazers

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

Watchers

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

dojo.io's Issues

Automated Testing on Examples

One of the biggest issues with examples on dojotoolkit.org was that new releases of dojo or new releases of browsers would leave examples broken. Without a way to monitor or identify these issues, we could only hope that a user would report the issue sooner, rather than later.

For dojo.io, examples should include unit tests and be structured in a way that automatically verifies that the example works with the latest version of dojo, or if it is deprecated any only works with the libraries used in the example.

Create "Reactive Programming" article

This document will focus on the concept of reactive programming and how it differs from traditional techniques. It should outline what reactive programming is and the advantages that this technique has when applied to front-end development.

Zip tutorial demos during deployment

When dojo.io is deployed, all of the demo projects that support the tutorials need to be zipped up and made available to be downloaded from the dojo.io site.

Consider using monaco-editor for tutorials

Discussion

As far as I am aware, the solutions we have for web editors for tutorials have fairly challenging limitations.

  • Do not integrate to TypeScript services, meaning Dojo 2's intellisense is unavailable in the editor. This severely limits the ability to demonstrate the advantages of Dojo 2, like CSS Modules and the rest of the types for @dojo as well as not demonstrating to the user that as they create code, they get the follow on intellisense of their changes.
  • Have demonstrated that they will likely be difficult to update as we update our tooling/versions/etc. and make it difficult to test the tutorials to make sure they continue to function.

I have done a really simple POC to see how difficult it is to get the monaco-editor to work in dojo.io. Here is the output of that simple POC:

monacoexample

The code for that is as follows:

---
title: Monaco Example Tutorial
layout: tutorial
overview: An example of the `monaco-editor` as a tutorial
---

# Monaco Example Tutorial

Let's see how this goes...

<div id="container" style="height: 800px; border:1px solid grey;"></div>

<script type="text/javascript" src="/editor/monaco-editor/min/vs/loader.js"></script>
<script>
	require.config({ paths: { 'vs': '/editor/monaco-editor/min/vs' }});

	window.MonacoEnvironment = {
		getWorkerUrl: function (workerId, label) {
			return 'monaco-editor-worker-loader-proxy.js';
		}
	};

	require([ 'vs/editor/editor.main' ], function () {
		monaco.editor.create(document.getElementById('container'), {
			value: [
				'function x() {',
				'\tconsole.log("Hello world!");',
				'}'
			].join('\n'),
			language: 'typescript'
		});
	});
</script>

And to the deployment I had to run the following:

grunt generate && rm -rf _dist/editor && cp -r site/editor _dist/editor

Path forward

If we were to create a package (e.g. @dojo/web-editor) we could inject additional opinionated way of editing/running additional Dojo 2 application on the web. Here are the high level functionality tasks I would see us needing to do:

  • Wrapping monaco-editor to make it super easy to "plop" onto a page. I believe at this point, moanco-editor would solve "out of the box" the following:
    • Ability to edit files of TypeScript/CSS/HTML/JavaScript
    • Ability to integrate to TypeScript services to get whole project code intelligence that is equivalent to the functionality of vscode.
    • APIs to update/display/retrieve file content.
  • A way to provide a manifest file of a "project" to be used with the editor to be able to edit and run an application in the browser
  • Provide an API/mechanism for navigating the files of the manifest, editing them and having that update the "project"
  • Figure out a way of doing what we need to do with postcss to allow CSS modules to be changed and emitted in browser
  • Provide an offline build process that can bundle manifests into projects that can be downloaded (or published to npm)
  • Provide a way of updating dependencies and updating the manifests in line with changes to the CLI.

The Future

Additional functionality that we would want but would be delivered in the future:

  • The ability to generate manifests from dojo CLI and potentially take a manifest and generate an application.
  • Creating new projects/code examples and being able to share them.

Investigate request limit

There is a 100,000 request limit per month on github pages. We should see if the limit can be updated. This is also directly related to #25

Navigation of API docs

This issue is to research/decide on features, switching between versions of API docs, how directory structures are laid out. May need second issue for design portion (TBD).

Dependent on the outcome of #39

Allow code snippets to be included in .md files

Currently there are several places in the dojo.io source where code snippets are manually copied from demo files into markdown files. Ideally, the markdown files should be able to link directly to the code snippets so that they don't get out of sync.

Tutorials for widget creation

Consider adding one (or more) tutorials that help new users understand the nuances of authoring non-trivial widgets.

Allow closing of Plunkr Panel

If I'm working on the tutorials locally (not using Plunkr), I do not want to see the Plunkr panel and it takes up a lot of room on the screen. Would be nice to allow that panel to be minimized.

Improved TypeDoc formatting

I had some similar thoughts to @jason0x43 when looking at the Dojo API docs that he mentioned in theintern/intern#727 (comment)

TypeDoc runs on Intern, Leadfoot, and Dig Dug. Unfortunately, the generated output isn't super well organizaed. Ideally we'd have something that looks structurally similar to Leadfoot's and Dig Dug's API docs now (not necessarily with the same styles; the bootstrap-like aesthetic of the default TypeDoc docs is probably fine), with top level modules in a side bar, and without a lot of noise in the property and function lists.

A stretch goal would be to improve TypeDoc's ability to handle arbitrary markdown files (besides README) so that we could just use TypeDoc to generate the entire docset for a given tool (expository docs as well as API docs).

Note that I'm not saying we need the left side navigation, but in general there's a lot of noise in the docs that make them less efficient to parse and use, and quite a bit of duplication of information in places.

A few points that I may have made elsewhere:

  • Why are things called Globals when they're not
  • Inside each package we repeat the package name 3 times at the top of the page (e.g. see the top of http://dojo.io/api/core/v2.0.0-alpha.26/ )
  • I'd probably like to see usage first (e.g. the constructor)
  • It would probably help for an index page to show all of the top level constructors, and then have a will to drill down and see more details, instead of having to click into every global to get details... e.g. the index page should list all the constructors for all the globals perhaps?

Create "The vDOM abstractions: d, w, and v" article

This article will discuss the three vDOM abstraction functions and how they relate to each other and the underlying “h” function. This section should discuss how Dojo 2 uses HyperScript, but should not get into too much detail on that. Links to HyperScript documentation should be provided, if needed.

Add keys to widget instances

The fourth tutorial's "finished" state doesn't work. This is caused by the lack of a "key" property with a unique value for each widget. Review each tutorial and add keys where appropriate. Also, update index.md's to discuss.

Search UI for API docs is broken

The search seems to work only if it lands on an exact entry you select, but it doesn’t offer up partial matches. As an example, if you type “iteration” it matches nothing and doesn’t even try to provide results. if you type “has” it drops down results to click on, but doesn’t refresh the page with results.

Intermediate data format for API docs

We need to build an intermediate data format for API docs (i.e. JSON or markdown). Goal is the ability to rebuild the site without checking out all of the repos.

Define website widgets

We will need some things like a mobile menu, tooltips, etc. from Dojo2 for the website. Define list here so we can get them created (if needed).

Rename css modules in tutorials

grunt-dojo2 and cli-build were both updated to rename CSS modules as .m.css (instead of .css).

What this means for you!

  • Any CSS file that is imported, i.e., import * as styles from './styles/myfile.css' needs to be renamed to .m.css, and the import statement updated: import * as styles from './styles/myfile.m.css.
  • Other CSS files (main.css) do not need to be renamed.

Update tutorial 000 to remove use of current `dojo create` command

Currently, the scaffolded app created by dojo create contains elements that were not considered when the first tutorial was written. This tutorial needs to be adjusted to point the learner toward downloading the pre-built project until a longer term solution is available

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.