npm install -g quantum-core
mkdir example-quantum-site
cd example-quantum-site
npm init
npm install --save-dev quantum-html quantum-docs
const html = require('quantum-html')
const docs = require('quantum-docs')
/*
Define the set of entity transforms - these transform
individual entries in the page to virtual dom.
*/
const htmlTransforms = {
html: html.entityTransforms(),
docs: docs.entityTransforms()
}
/*
Define the pipeline - this transforms an entire page from
quantum ast to HTML.
*/
const pipeline = [
html.fileTransform({ entityTransforms: htmlTransforms })
]
/* Export the pipeline, the pages we want to transform */
module.exports = {
pipeline: pipeline,
pages: '*.um'
}
@topSection
@title My First Page
@description: My first page built with Quantum
@contentSection
@topic Information
Page Content can go inside topics
@section Sub-information
It can also go inside sections inside topics
@codeblock js
// Example Codeblock
const length = 5
for (let i = 0; i < length; i++) {
console.log(i)
}
quantum build
'target'
directory for the output. There should be a file called index.html in there - open it up in a browser to see what has been generated. quantum watch
quantum watch
, open http://localhost:8080 in your browser and then change something in index.um.